//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension CodePipeline {
    // MARK: Enums

    public enum ActionCategory: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case approval = "Approval"
        case build = "Build"
        case compute = "Compute"
        case deploy = "Deploy"
        case invoke = "Invoke"
        case source = "Source"
        case test = "Test"
        public var description: String { return self.rawValue }
    }

    public enum ActionConfigurationPropertyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case boolean = "Boolean"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum ActionExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case abandoned = "Abandoned"
        case failed = "Failed"
        case inProgress = "InProgress"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum ActionOwner: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aws = "AWS"
        case custom = "Custom"
        case thirdParty = "ThirdParty"
        public var description: String { return self.rawValue }
    }

    public enum ApprovalStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case approved = "Approved"
        case rejected = "Rejected"
        public var description: String { return self.rawValue }
    }

    public enum ArtifactLocationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum ArtifactStoreType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum BlockerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case schedule = "Schedule"
        public var description: String { return self.rawValue }
    }

    public enum ConditionExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case abandoned = "Abandoned"
        case cancelled = "Cancelled"
        case errored = "Errored"
        case failed = "Failed"
        case inProgress = "InProgress"
        case overridden = "Overridden"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum ConditionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case beforeEntry = "BEFORE_ENTRY"
        case onSuccess = "ON_SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum EncryptionKeyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case kms = "KMS"
        public var description: String { return self.rawValue }
    }

    public enum EnvironmentVariableType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case plaintext = "PLAINTEXT"
        case secretsManager = "SECRETS_MANAGER"
        public var description: String { return self.rawValue }
    }

    public enum ExecutionMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case parallel = "PARALLEL"
        case queued = "QUEUED"
        case superseded = "SUPERSEDED"
        public var description: String { return self.rawValue }
    }

    public enum ExecutionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case rollback = "ROLLBACK"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum ExecutorType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case jobWorker = "JobWorker"
        case lambda = "Lambda"
        public var description: String { return self.rawValue }
    }

    public enum FailureType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case configurationError = "ConfigurationError"
        case jobFailed = "JobFailed"
        case permissionError = "PermissionError"
        case revisionOutOfSync = "RevisionOutOfSync"
        case revisionUnavailable = "RevisionUnavailable"
        case systemUnavailable = "SystemUnavailable"
        public var description: String { return self.rawValue }
    }

    public enum GitPullRequestEventType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case closed = "CLOSED"
        case open = "OPEN"
        case updated = "UPDATED"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "Created"
        case dispatched = "Dispatched"
        case failed = "Failed"
        case inProgress = "InProgress"
        case queued = "Queued"
        case succeeded = "Succeeded"
        case timedOut = "TimedOut"
        public var description: String { return self.rawValue }
    }

    public enum PipelineExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "Cancelled"
        case failed = "Failed"
        case inProgress = "InProgress"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        case superseded = "Superseded"
        public var description: String { return self.rawValue }
    }

    public enum PipelineTriggerProviderType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case codeStarSourceConnection = "CodeStarSourceConnection"
        public var description: String { return self.rawValue }
    }

    public enum PipelineType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case v1 = "V1"
        case v2 = "V2"
        public var description: String { return self.rawValue }
    }

    public enum Result: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fail = "FAIL"
        case retry = "RETRY"
        case rollback = "ROLLBACK"
        case skip = "SKIP"
        public var description: String { return self.rawValue }
    }

    public enum RetryTrigger: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case automatedStageRetry = "AutomatedStageRetry"
        case manualStageRetry = "ManualStageRetry"
        public var description: String { return self.rawValue }
    }

    public enum RuleCategory: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case rule = "Rule"
        public var description: String { return self.rawValue }
    }

    public enum RuleConfigurationPropertyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case boolean = "Boolean"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum RuleExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case abandoned = "Abandoned"
        case failed = "Failed"
        case inProgress = "InProgress"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum RuleOwner: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aws = "AWS"
        public var description: String { return self.rawValue }
    }

    public enum SourceRevisionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case commitId = "COMMIT_ID"
        case imageDigest = "IMAGE_DIGEST"
        case s3ObjectKey = "S3_OBJECT_KEY"
        case s3ObjectVersionId = "S3_OBJECT_VERSION_ID"
        public var description: String { return self.rawValue }
    }

    public enum StageExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "Cancelled"
        case failed = "Failed"
        case inProgress = "InProgress"
        case skipped = "Skipped"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum StageRetryMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allActions = "ALL_ACTIONS"
        case failedActions = "FAILED_ACTIONS"
        public var description: String { return self.rawValue }
    }

    public enum StageTransitionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case inbound = "Inbound"
        case outbound = "Outbound"
        public var description: String { return self.rawValue }
    }

    public enum StartTimeRange: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "All"
        case latest = "Latest"
        public var description: String { return self.rawValue }
    }

    public enum TargetFilterName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case targetStatus = "TARGET_STATUS"
        public var description: String { return self.rawValue }
    }

    public enum TriggerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case automatedRollback = "AutomatedRollback"
        case cloudWatchEvent = "CloudWatchEvent"
        case createPipeline = "CreatePipeline"
        case manualRollback = "ManualRollback"
        case pollForSourceChanges = "PollForSourceChanges"
        case putActionRevision = "PutActionRevision"
        case startPipelineExecution = "StartPipelineExecution"
        case webhook = "Webhook"
        case webhookV2 = "WebhookV2"
        public var description: String { return self.rawValue }
    }

    public enum WebhookAuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case githubHmac = "GITHUB_HMAC"
        case ip = "IP"
        case unauthenticated = "UNAUTHENTICATED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AWSSessionCredentials: AWSDecodableShape {
        /// The access key for the session.
        public let accessKeyId: String
        /// The secret access key for the session.
        public let secretAccessKey: String
        /// The token for the session.
        public let sessionToken: String

        @inlinable
        public init(accessKeyId: String, secretAccessKey: String, sessionToken: String) {
            self.accessKeyId = accessKeyId
            self.secretAccessKey = secretAccessKey
            self.sessionToken = sessionToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessKeyId = "accessKeyId"
            case secretAccessKey = "secretAccessKey"
            case sessionToken = "sessionToken"
        }
    }

    public struct AcknowledgeJobInput: AWSEncodableShape {
        /// The unique system-generated ID of the job for which you want to confirm receipt.
        public let jobId: String
        /// A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the PollForJobs request that returned this job.
        public let nonce: String

        @inlinable
        public init(jobId: String, nonce: String) {
            self.jobId = jobId
            self.nonce = nonce
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.nonce, name: "nonce", parent: name, max: 50)
            try self.validate(self.nonce, name: "nonce", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "jobId"
            case nonce = "nonce"
        }
    }

    public struct AcknowledgeJobOutput: AWSDecodableShape {
        /// Whether the job worker has received the specified job.
        public let status: JobStatus?

        @inlinable
        public init(status: JobStatus? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
        }
    }

    public struct AcknowledgeThirdPartyJobInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// The unique system-generated ID of the job.
        public let jobId: String
        /// A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response to a GetThirdPartyJobDetails request.
        public let nonce: String

        @inlinable
        public init(clientToken: String, jobId: String, nonce: String) {
            self.clientToken = clientToken
            self.jobId = jobId
            self.nonce = nonce
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.nonce, name: "nonce", parent: name, max: 50)
            try self.validate(self.nonce, name: "nonce", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case jobId = "jobId"
            case nonce = "nonce"
        }
    }

    public struct AcknowledgeThirdPartyJobOutput: AWSDecodableShape {
        /// The status information for the third party job, if any.
        public let status: JobStatus?

        @inlinable
        public init(status: JobStatus? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
        }
    }

    public struct ActionConfiguration: AWSDecodableShape {
        /// The configuration data for the action.
        public let configuration: [String: String]?

        @inlinable
        public init(configuration: [String: String]? = nil) {
            self.configuration = configuration
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "configuration"
        }
    }

    public struct ActionConfigurationProperty: AWSEncodableShape & AWSDecodableShape {
        /// The description of the action configuration property that is displayed to users.
        public let description: String?
        /// Whether the configuration property is a key.
        public let key: Bool
        /// The name of the action configuration property.
        public let name: String
        /// Indicates that the property is used with PollForJobs. When creating a custom action, an action can have up to one queryable property. If it has one, that property must be both required and not secret. If you create a pipeline with a custom action type, and that custom action contains a queryable property, the value for that configuration property is subject to other restrictions. The value must be less than or equal to twenty (20) characters. The value can contain only alphanumeric characters, underscores, and hyphens.
        public let queryable: Bool?
        /// Whether the configuration property is a required value.
        public let required: Bool
        /// Whether the configuration property is secret. Secrets are hidden from all calls except for GetJobDetails, GetThirdPartyJobDetails, PollForJobs, and PollForThirdPartyJobs. When updating a pipeline, passing * * * * * without changing any other values of the action preserves the previous value of the secret.
        public let secret: Bool
        /// The type of the configuration property.
        public let type: ActionConfigurationPropertyType?

        @inlinable
        public init(description: String? = nil, key: Bool, name: String, queryable: Bool? = nil, required: Bool, secret: Bool, type: ActionConfigurationPropertyType? = nil) {
            self.description = description
            self.key = key
            self.name = name
            self.queryable = queryable
            self.required = required
            self.secret = secret
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 160)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case key = "key"
            case name = "name"
            case queryable = "queryable"
            case required = "required"
            case secret = "secret"
            case type = "type"
        }
    }

    public struct ActionContext: AWSDecodableShape {
        /// The system-generated unique ID that corresponds to an action's execution.
        public let actionExecutionId: String?
        /// The name of the action in the context of a job.
        public let name: String?

        @inlinable
        public init(actionExecutionId: String? = nil, name: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId = "actionExecutionId"
            case name = "name"
        }
    }

    public struct ActionDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the action type and the provider of the action.
        public let actionTypeId: ActionTypeId
        /// The shell commands to run with your compute action in CodePipeline. All commands are supported except multi-line formats. While CodeBuild logs and permissions are used, you do not need to create any resources in CodeBuild.  Using compute time for this action will incur separate charges in CodeBuild.
        public let commands: [String]?
        /// The action's configuration. These are key-value pairs that specify input values for an action. For more information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the CloudFormation action type in CodePipeline, see Configuration Properties Reference in the CloudFormation User Guide. For template snippets with examples, see Using Parameter Override Functions with CodePipeline Pipelines in the CloudFormation User Guide. The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is as follows:   JSON:   "Configuration" : { Key : Value },
        public let configuration: [String: String]?
        /// The environment variables for the action.
        public let environmentVariables: [EnvironmentVariable]?
        /// The name or ID of the artifact consumed by the action, such as a test or build artifact.
        public let inputArtifacts: [InputArtifact]?
        /// The action declaration's name.
        public let name: String
        /// The variable namespace associated with the action. All variables produced as output by this action fall under this namespace.
        public let namespace: String?
        /// The name or ID of the result of the action declaration, such as a test or build artifact.
        public let outputArtifacts: [OutputArtifact]?
        /// The list of variables that are to be exported from the compute action. This is specifically CodeBuild environment variables as used for that action.
        public let outputVariables: [String]?
        /// The action declaration's Amazon Web Services Region, such as us-east-1.
        public let region: String?
        /// The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the pipeline.
        public let roleArn: String?
        /// The order in which actions are run.
        public let runOrder: Int?
        /// A timeout duration in minutes that can be applied against the ActionType’s default timeout value specified in Quotas for CodePipeline . This attribute is available only to the manual approval ActionType.
        public let timeoutInMinutes: Int?

        @inlinable
        public init(actionTypeId: ActionTypeId, commands: [String]? = nil, configuration: [String: String]? = nil, environmentVariables: [EnvironmentVariable]? = nil, inputArtifacts: [InputArtifact]? = nil, name: String, namespace: String? = nil, outputArtifacts: [OutputArtifact]? = nil, outputVariables: [String]? = nil, region: String? = nil, roleArn: String? = nil, runOrder: Int? = nil, timeoutInMinutes: Int? = nil) {
            self.actionTypeId = actionTypeId
            self.commands = commands
            self.configuration = configuration
            self.environmentVariables = environmentVariables
            self.inputArtifacts = inputArtifacts
            self.name = name
            self.namespace = namespace
            self.outputArtifacts = outputArtifacts
            self.outputVariables = outputVariables
            self.region = region
            self.roleArn = roleArn
            self.runOrder = runOrder
            self.timeoutInMinutes = timeoutInMinutes
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.commands?.forEach {
                try validate($0, name: "commands[]", parent: name, max: 1000)
                try validate($0, name: "commands[]", parent: name, min: 1)
            }
            try self.validate(self.commands, name: "commands", parent: name, max: 50)
            try self.validate(self.commands, name: "commands", parent: name, min: 1)
            try self.configuration?.forEach {
                try validate($0.key, name: "configuration.key", parent: name, max: 50)
                try validate($0.key, name: "configuration.key", parent: name, min: 1)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, max: 1000)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.environmentVariables?.forEach {
                try $0.validate(name: "\(name).environmentVariables[]")
            }
            try self.validate(self.environmentVariables, name: "environmentVariables", parent: name, max: 10)
            try self.validate(self.environmentVariables, name: "environmentVariables", parent: name, min: 1)
            try self.inputArtifacts?.forEach {
                try $0.validate(name: "\(name).inputArtifacts[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.namespace, name: "namespace", parent: name, max: 100)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "^[A-Za-z0-9@\\-_]+$")
            try self.outputArtifacts?.forEach {
                try $0.validate(name: "\(name).outputArtifacts[]")
            }
            try self.outputVariables?.forEach {
                try validate($0, name: "outputVariables[]", parent: name, max: 128)
                try validate($0, name: "outputVariables[]", parent: name, min: 1)
            }
            try self.validate(self.outputVariables, name: "outputVariables", parent: name, max: 15)
            try self.validate(self.outputVariables, name: "outputVariables", parent: name, min: 1)
            try self.validate(self.region, name: "region", parent: name, max: 30)
            try self.validate(self.region, name: "region", parent: name, min: 4)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1024)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/")
            try self.validate(self.runOrder, name: "runOrder", parent: name, max: 999)
            try self.validate(self.runOrder, name: "runOrder", parent: name, min: 1)
            try self.validate(self.timeoutInMinutes, name: "timeoutInMinutes", parent: name, max: 86400)
            try self.validate(self.timeoutInMinutes, name: "timeoutInMinutes", parent: name, min: 5)
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId = "actionTypeId"
            case commands = "commands"
            case configuration = "configuration"
            case environmentVariables = "environmentVariables"
            case inputArtifacts = "inputArtifacts"
            case name = "name"
            case namespace = "namespace"
            case outputArtifacts = "outputArtifacts"
            case outputVariables = "outputVariables"
            case region = "region"
            case roleArn = "roleArn"
            case runOrder = "runOrder"
            case timeoutInMinutes = "timeoutInMinutes"
        }
    }

    public struct ActionExecution: AWSDecodableShape {
        /// ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the current action execution details of the current stage.  For older executions, this field might be empty. The action execution ID is available for executions run on or after March 2020.
        public let actionExecutionId: String?
        /// The details of an error returned by a URL external to Amazon Web Services.
        public let errorDetails: ErrorDetails?
        /// The external ID of the run of the action.
        public let externalExecutionId: String?
        /// The URL of a resource external to Amazon Web Services that is used when running the action (for example, an external repository URL).
        public let externalExecutionUrl: String?
        /// The last status change of the action.
        public let lastStatusChange: Date?
        /// The ARN of the user who last changed the pipeline.
        public let lastUpdatedBy: String?
        /// The Amazon Resource Name (ARN) of the log stream for the action compute.
        public let logStreamARN: String?
        /// A percentage of completeness of the action as it runs.
        public let percentComplete: Int?
        /// The status of the action, or for a completed action, the last status of the action.
        public let status: ActionExecutionStatus?
        /// A summary of the run of the action.
        public let summary: String?
        /// The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState command. It is used to validate that the approval request corresponding to this token is still valid.
        public let token: String?

        @inlinable
        public init(actionExecutionId: String? = nil, errorDetails: ErrorDetails? = nil, externalExecutionId: String? = nil, externalExecutionUrl: String? = nil, lastStatusChange: Date? = nil, lastUpdatedBy: String? = nil, logStreamARN: String? = nil, percentComplete: Int? = nil, status: ActionExecutionStatus? = nil, summary: String? = nil, token: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.errorDetails = errorDetails
            self.externalExecutionId = externalExecutionId
            self.externalExecutionUrl = externalExecutionUrl
            self.lastStatusChange = lastStatusChange
            self.lastUpdatedBy = lastUpdatedBy
            self.logStreamARN = logStreamARN
            self.percentComplete = percentComplete
            self.status = status
            self.summary = summary
            self.token = token
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId = "actionExecutionId"
            case errorDetails = "errorDetails"
            case externalExecutionId = "externalExecutionId"
            case externalExecutionUrl = "externalExecutionUrl"
            case lastStatusChange = "lastStatusChange"
            case lastUpdatedBy = "lastUpdatedBy"
            case logStreamARN = "logStreamARN"
            case percentComplete = "percentComplete"
            case status = "status"
            case summary = "summary"
            case token = "token"
        }
    }

    public struct ActionExecutionDetail: AWSDecodableShape {
        /// The action execution ID.
        public let actionExecutionId: String?
        /// The name of the action.
        public let actionName: String?
        /// Input details for the action execution, such as role ARN, Region, and input artifacts.
        public let input: ActionExecutionInput?
        /// The last update time of the action execution.
        public let lastUpdateTime: Date?
        /// Output details for the action execution, such as the action execution result.
        public let output: ActionExecutionOutput?
        /// The pipeline execution ID for the action execution.
        public let pipelineExecutionId: String?
        /// The version of the pipeline where the action was run.
        public let pipelineVersion: Int?
        /// The name of the stage that contains the action.
        public let stageName: String?
        /// The start time of the action execution.
        public let startTime: Date?
        ///  The status of the action execution. Status categories are InProgress, Succeeded, and Failed.
        public let status: ActionExecutionStatus?
        /// The ARN of the user who changed the pipeline execution details.
        public let updatedBy: String?

        @inlinable
        public init(actionExecutionId: String? = nil, actionName: String? = nil, input: ActionExecutionInput? = nil, lastUpdateTime: Date? = nil, output: ActionExecutionOutput? = nil, pipelineExecutionId: String? = nil, pipelineVersion: Int? = nil, stageName: String? = nil, startTime: Date? = nil, status: ActionExecutionStatus? = nil, updatedBy: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.actionName = actionName
            self.input = input
            self.lastUpdateTime = lastUpdateTime
            self.output = output
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineVersion = pipelineVersion
            self.stageName = stageName
            self.startTime = startTime
            self.status = status
            self.updatedBy = updatedBy
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId = "actionExecutionId"
            case actionName = "actionName"
            case input = "input"
            case lastUpdateTime = "lastUpdateTime"
            case output = "output"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineVersion = "pipelineVersion"
            case stageName = "stageName"
            case startTime = "startTime"
            case status = "status"
            case updatedBy = "updatedBy"
        }
    }

    public struct ActionExecutionFilter: AWSEncodableShape {
        /// The latest execution in the pipeline.  Filtering on the latest execution is available for executions run on or after February 08, 2024.
        public let latestInPipelineExecution: LatestInPipelineExecutionFilter?
        /// The pipeline execution ID used to filter action execution history.
        public let pipelineExecutionId: String?

        @inlinable
        public init(latestInPipelineExecution: LatestInPipelineExecutionFilter? = nil, pipelineExecutionId: String? = nil) {
            self.latestInPipelineExecution = latestInPipelineExecution
            self.pipelineExecutionId = pipelineExecutionId
        }

        public func validate(name: String) throws {
            try self.latestInPipelineExecution?.validate(name: "\(name).latestInPipelineExecution")
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case latestInPipelineExecution = "latestInPipelineExecution"
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct ActionExecutionInput: AWSDecodableShape {
        public let actionTypeId: ActionTypeId?
        /// Configuration data for an action execution.
        public let configuration: [String: String]?
        /// Details of input artifacts of the action that correspond to the action execution.
        public let inputArtifacts: [ArtifactDetail]?
        /// The variable namespace associated with the action. All variables produced as output by this action fall under this namespace.
        public let namespace: String?
        /// The Amazon Web Services Region for the action, such as us-east-1.
        public let region: String?
        /// Configuration data for an action execution with all variable references replaced with their real values for the execution.
        public let resolvedConfiguration: [String: String]?
        /// The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the pipeline.
        public let roleArn: String?

        @inlinable
        public init(actionTypeId: ActionTypeId? = nil, configuration: [String: String]? = nil, inputArtifacts: [ArtifactDetail]? = nil, namespace: String? = nil, region: String? = nil, resolvedConfiguration: [String: String]? = nil, roleArn: String? = nil) {
            self.actionTypeId = actionTypeId
            self.configuration = configuration
            self.inputArtifacts = inputArtifacts
            self.namespace = namespace
            self.region = region
            self.resolvedConfiguration = resolvedConfiguration
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId = "actionTypeId"
            case configuration = "configuration"
            case inputArtifacts = "inputArtifacts"
            case namespace = "namespace"
            case region = "region"
            case resolvedConfiguration = "resolvedConfiguration"
            case roleArn = "roleArn"
        }
    }

    public struct ActionExecutionOutput: AWSDecodableShape {
        /// Execution result information listed in the output details for an action execution.
        public let executionResult: ActionExecutionResult?
        /// Details of output artifacts of the action that correspond to the action execution.
        public let outputArtifacts: [ArtifactDetail]?
        /// The outputVariables field shows the key-value pairs that were output as part of that execution.
        public let outputVariables: [String: String]?

        @inlinable
        public init(executionResult: ActionExecutionResult? = nil, outputArtifacts: [ArtifactDetail]? = nil, outputVariables: [String: String]? = nil) {
            self.executionResult = executionResult
            self.outputArtifacts = outputArtifacts
            self.outputVariables = outputVariables
        }

        private enum CodingKeys: String, CodingKey {
            case executionResult = "executionResult"
            case outputArtifacts = "outputArtifacts"
            case outputVariables = "outputVariables"
        }
    }

    public struct ActionExecutionResult: AWSDecodableShape {
        public let errorDetails: ErrorDetails?
        /// The action provider's external ID for the action execution.
        public let externalExecutionId: String?
        /// The action provider's summary for the action execution.
        public let externalExecutionSummary: String?
        /// The deepest external link to the external resource (for example, a repository URL or deployment endpoint) that is used when running the action.
        public let externalExecutionUrl: String?
        /// The Amazon Resource Name (ARN) of the log stream for the action compute.
        public let logStreamARN: String?

        @inlinable
        public init(errorDetails: ErrorDetails? = nil, externalExecutionId: String? = nil, externalExecutionSummary: String? = nil, externalExecutionUrl: String? = nil, logStreamARN: String? = nil) {
            self.errorDetails = errorDetails
            self.externalExecutionId = externalExecutionId
            self.externalExecutionSummary = externalExecutionSummary
            self.externalExecutionUrl = externalExecutionUrl
            self.logStreamARN = logStreamARN
        }

        private enum CodingKeys: String, CodingKey {
            case errorDetails = "errorDetails"
            case externalExecutionId = "externalExecutionId"
            case externalExecutionSummary = "externalExecutionSummary"
            case externalExecutionUrl = "externalExecutionUrl"
            case logStreamARN = "logStreamARN"
        }
    }

    public struct ActionRevision: AWSEncodableShape & AWSDecodableShape {
        /// The date and time when the most recent version of the action was created, in timestamp format.
        public let created: Date
        /// The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).
        public let revisionChangeId: String
        /// The system-generated unique ID that identifies the revision number of the action.
        public let revisionId: String

        @inlinable
        public init(created: Date, revisionChangeId: String, revisionId: String) {
            self.created = created
            self.revisionChangeId = revisionChangeId
            self.revisionId = revisionId
        }

        public func validate(name: String) throws {
            try self.validate(self.revisionChangeId, name: "revisionChangeId", parent: name, max: 100)
            try self.validate(self.revisionChangeId, name: "revisionChangeId", parent: name, min: 1)
            try self.validate(self.revisionId, name: "revisionId", parent: name, max: 1500)
            try self.validate(self.revisionId, name: "revisionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case revisionChangeId = "revisionChangeId"
            case revisionId = "revisionId"
        }
    }

    public struct ActionState: AWSDecodableShape {
        /// The name of the action.
        public let actionName: String?
        /// Represents information about the version (or revision) of an action.
        public let currentRevision: ActionRevision?
        /// A URL link for more information about the state of the action, such as a deployment group details page.
        public let entityUrl: String?
        /// Represents information about the run of an action.
        public let latestExecution: ActionExecution?
        /// A URL link for more information about the revision, such as a commit details page.
        public let revisionUrl: String?

        @inlinable
        public init(actionName: String? = nil, currentRevision: ActionRevision? = nil, entityUrl: String? = nil, latestExecution: ActionExecution? = nil, revisionUrl: String? = nil) {
            self.actionName = actionName
            self.currentRevision = currentRevision
            self.entityUrl = entityUrl
            self.latestExecution = latestExecution
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case currentRevision = "currentRevision"
            case entityUrl = "entityUrl"
            case latestExecution = "latestExecution"
            case revisionUrl = "revisionUrl"
        }
    }

    public struct ActionType: AWSDecodableShape {
        /// The configuration properties for the action type.
        public let actionConfigurationProperties: [ActionConfigurationProperty]?
        /// Represents information about an action type.
        public let id: ActionTypeId
        /// The details of the input artifact for the action, such as its commit ID.
        public let inputArtifactDetails: ArtifactDetails
        /// The details of the output artifact of the action, such as its commit ID.
        public let outputArtifactDetails: ArtifactDetails
        /// The settings for the action type.
        public let settings: ActionTypeSettings?

        @inlinable
        public init(actionConfigurationProperties: [ActionConfigurationProperty]? = nil, id: ActionTypeId, inputArtifactDetails: ArtifactDetails, outputArtifactDetails: ArtifactDetails, settings: ActionTypeSettings? = nil) {
            self.actionConfigurationProperties = actionConfigurationProperties
            self.id = id
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.settings = settings
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfigurationProperties = "actionConfigurationProperties"
            case id = "id"
            case inputArtifactDetails = "inputArtifactDetails"
            case outputArtifactDetails = "outputArtifactDetails"
            case settings = "settings"
        }
    }

    public struct ActionTypeArtifactDetails: AWSEncodableShape & AWSDecodableShape {
        /// The maximum number of artifacts that can be used with the actiontype. For example, you should specify a minimum and maximum of zero input artifacts for an action type with a category of source.
        public let maximumCount: Int
        /// The minimum number of artifacts that can be used with the action type. For example, you should specify a minimum and maximum of zero input artifacts for an action type with a category of source.
        public let minimumCount: Int

        @inlinable
        public init(maximumCount: Int, minimumCount: Int) {
            self.maximumCount = maximumCount
            self.minimumCount = minimumCount
        }

        public func validate(name: String) throws {
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, max: 10)
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, min: 0)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, max: 10)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maximumCount = "maximumCount"
            case minimumCount = "minimumCount"
        }
    }

    public struct ActionTypeDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The description for the action type to be updated.
        public let description: String?
        /// Information about the executor for an action type that was created with any supported integration model.
        public let executor: ActionTypeExecutor
        /// The action category, owner, provider, and version of the action type to be updated.
        public let id: ActionTypeIdentifier
        /// Details for the artifacts, such as application files, to be worked on by the action. For example, the minimum and maximum number of input artifacts allowed.
        public let inputArtifactDetails: ActionTypeArtifactDetails
        /// Details for the output artifacts, such as a built application, that are the result of the action. For example, the minimum and maximum number of output artifacts allowed.
        public let outputArtifactDetails: ActionTypeArtifactDetails
        /// Details identifying the accounts with permissions to use the action type.
        public let permissions: ActionTypePermissions?
        /// The properties of the action type to be updated.
        public let properties: [ActionTypeProperty]?
        /// The links associated with the action type to be updated.
        public let urls: ActionTypeUrls?

        @inlinable
        public init(description: String? = nil, executor: ActionTypeExecutor, id: ActionTypeIdentifier, inputArtifactDetails: ActionTypeArtifactDetails, outputArtifactDetails: ActionTypeArtifactDetails, permissions: ActionTypePermissions? = nil, properties: [ActionTypeProperty]? = nil, urls: ActionTypeUrls? = nil) {
            self.description = description
            self.executor = executor
            self.id = id
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.permissions = permissions
            self.properties = properties
            self.urls = urls
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.executor.validate(name: "\(name).executor")
            try self.id.validate(name: "\(name).id")
            try self.inputArtifactDetails.validate(name: "\(name).inputArtifactDetails")
            try self.outputArtifactDetails.validate(name: "\(name).outputArtifactDetails")
            try self.permissions?.validate(name: "\(name).permissions")
            try self.properties?.forEach {
                try $0.validate(name: "\(name).properties[]")
            }
            try self.validate(self.properties, name: "properties", parent: name, max: 10)
            try self.urls?.validate(name: "\(name).urls")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case executor = "executor"
            case id = "id"
            case inputArtifactDetails = "inputArtifactDetails"
            case outputArtifactDetails = "outputArtifactDetails"
            case permissions = "permissions"
            case properties = "properties"
            case urls = "urls"
        }
    }

    public struct ActionTypeExecutor: AWSEncodableShape & AWSDecodableShape {
        /// The action configuration properties for the action type. These properties are specified in the action definition when the action type is created.
        public let configuration: ExecutorConfiguration
        /// The timeout in seconds for the job. An action execution can have multiple jobs. This is the timeout for a single job, not the entire action execution.
        public let jobTimeout: Int?
        /// The policy statement that specifies the permissions in the CodePipeline customer account that are needed to successfully run an action. To grant permission to another account, specify the account ID as the Principal, a domain-style identifier defined by the service, for example codepipeline.amazonaws.com.  The size of the passed JSON policy document cannot exceed 2048 characters.
        public let policyStatementsTemplate: String?
        /// The integration model used to create and update the action type, Lambda or JobWorker.
        public let type: ExecutorType

        @inlinable
        public init(configuration: ExecutorConfiguration, jobTimeout: Int? = nil, policyStatementsTemplate: String? = nil, type: ExecutorType) {
            self.configuration = configuration
            self.jobTimeout = jobTimeout
            self.policyStatementsTemplate = policyStatementsTemplate
            self.type = type
        }

        public func validate(name: String) throws {
            try self.configuration.validate(name: "\(name).configuration")
            try self.validate(self.jobTimeout, name: "jobTimeout", parent: name, max: 43200)
            try self.validate(self.jobTimeout, name: "jobTimeout", parent: name, min: 60)
            try self.validate(self.policyStatementsTemplate, name: "policyStatementsTemplate", parent: name, max: 2048)
            try self.validate(self.policyStatementsTemplate, name: "policyStatementsTemplate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "configuration"
            case jobTimeout = "jobTimeout"
            case policyStatementsTemplate = "policyStatementsTemplate"
            case type = "type"
        }
    }

    public struct ActionTypeId: AWSEncodableShape & AWSDecodableShape {
        /// A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the following values.    Source   Build   Test   Deploy   Invoke   Approval   Compute
        public let category: ActionCategory
        /// The creator of the action being called. There are three valid values for the Owner field in the action category section within your pipeline structure: AWS, ThirdParty, and Custom. For more information, see Valid Action Types and Providers in CodePipeline.
        public let owner: ActionOwner
        /// The provider of the service being called by the action. Valid providers are determined by the action category. For example, an action in the Deploy category type might have a provider of CodeDeploy, which would be specified as CodeDeploy. For more information, see Valid Action Types and Providers in CodePipeline.
        public let provider: String
        /// A string that describes the action version.
        public let version: String

        @inlinable
        public init(category: ActionCategory, owner: ActionOwner, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case owner = "owner"
            case provider = "provider"
            case version = "version"
        }
    }

    public struct ActionTypeIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// Defines what kind of action can be taken in the stage, one of the following:    Source     Build     Test     Deploy     Approval     Invoke
        public let category: ActionCategory
        /// The creator of the action type being called: AWS or ThirdParty.
        public let owner: String
        /// The provider of the action type being called. The provider name is supplied when the action type is created.
        public let provider: String
        /// A string that describes the action type version.
        public let version: String

        @inlinable
        public init(category: ActionCategory, owner: String, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.owner, name: "owner", parent: name, pattern: "^AWS|ThirdParty$")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case owner = "owner"
            case provider = "provider"
            case version = "version"
        }
    }

    public struct ActionTypePermissions: AWSEncodableShape & AWSDecodableShape {
        /// A list of Amazon Web Services account IDs with access to use the action type in their pipelines.
        public let allowedAccounts: [String]

        @inlinable
        public init(allowedAccounts: [String]) {
            self.allowedAccounts = allowedAccounts
        }

        public func validate(name: String) throws {
            try self.allowedAccounts.forEach {
                try validate($0, name: "allowedAccounts[]", parent: name, pattern: "^[0-9]{12}|\\*$")
            }
            try self.validate(self.allowedAccounts, name: "allowedAccounts", parent: name, max: 1000)
            try self.validate(self.allowedAccounts, name: "allowedAccounts", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowedAccounts = "allowedAccounts"
        }
    }

    public struct ActionTypeProperty: AWSEncodableShape & AWSDecodableShape {
        /// The description of the property that is displayed to users.
        public let description: String?
        /// Whether the configuration property is a key.
        public let key: Bool
        /// The property name that is displayed to users.
        public let name: String
        /// Whether to omit the field value entered by the customer in the log. If true, the value is not saved in CloudTrail logs for the action execution.
        public let noEcho: Bool
        /// Whether the configuration property is an optional value.
        public let optional: Bool
        /// Indicates that the property is used with polling. An action type can have up to one queryable property. If it has one, that property must be both required and not secret.
        public let queryable: Bool?

        @inlinable
        public init(description: String? = nil, key: Bool, name: String, noEcho: Bool, optional: Bool, queryable: Bool? = nil) {
            self.description = description
            self.key = key
            self.name = name
            self.noEcho = noEcho
            self.optional = optional
            self.queryable = queryable
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 250)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case key = "key"
            case name = "name"
            case noEcho = "noEcho"
            case optional = "optional"
            case queryable = "queryable"
        }
    }

    public struct ActionTypeSettings: AWSEncodableShape & AWSDecodableShape {
        /// The URL returned to the CodePipeline console that provides a deep link to the resources of the external system, such as the configuration page for a CodeDeploy deployment group. This link is provided as part of the action display in the pipeline.
        public let entityUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the top-level landing page for the external system, such as the console page for CodeDeploy. This link is shown on the pipeline view page in the CodePipeline console and provides a link to the execution entity of the external action.
        public let executionUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.
        public let revisionUrlTemplate: String?
        /// The URL of a sign-up page where users can sign up for an external service and perform initial configuration of the action provided by that service.
        public let thirdPartyConfigurationUrl: String?

        @inlinable
        public init(entityUrlTemplate: String? = nil, executionUrlTemplate: String? = nil, revisionUrlTemplate: String? = nil, thirdPartyConfigurationUrl: String? = nil) {
            self.entityUrlTemplate = entityUrlTemplate
            self.executionUrlTemplate = executionUrlTemplate
            self.revisionUrlTemplate = revisionUrlTemplate
            self.thirdPartyConfigurationUrl = thirdPartyConfigurationUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, max: 2048)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, min: 1)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, min: 1)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, min: 1)
            try self.validate(self.thirdPartyConfigurationUrl, name: "thirdPartyConfigurationUrl", parent: name, max: 2048)
            try self.validate(self.thirdPartyConfigurationUrl, name: "thirdPartyConfigurationUrl", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entityUrlTemplate = "entityUrlTemplate"
            case executionUrlTemplate = "executionUrlTemplate"
            case revisionUrlTemplate = "revisionUrlTemplate"
            case thirdPartyConfigurationUrl = "thirdPartyConfigurationUrl"
        }
    }

    public struct ActionTypeUrls: AWSEncodableShape & AWSDecodableShape {
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can configure the external action.
        public let configurationUrl: String?
        /// The URL returned to the CodePipeline console that provides a deep link to the resources of the external system, such as a status page. This link is provided as part of the action display in the pipeline.
        public let entityUrlTemplate: String?
        /// The link to an execution page for the action type in progress. For example, for a CodeDeploy action, this link is shown on the pipeline view page in the CodePipeline console, and it links to a CodeDeploy status page.
        public let executionUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.
        public let revisionUrlTemplate: String?

        @inlinable
        public init(configurationUrl: String? = nil, entityUrlTemplate: String? = nil, executionUrlTemplate: String? = nil, revisionUrlTemplate: String? = nil) {
            self.configurationUrl = configurationUrl
            self.entityUrlTemplate = entityUrlTemplate
            self.executionUrlTemplate = executionUrlTemplate
            self.revisionUrlTemplate = revisionUrlTemplate
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationUrl, name: "configurationUrl", parent: name, max: 2048)
            try self.validate(self.configurationUrl, name: "configurationUrl", parent: name, min: 1)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, max: 2048)
            try self.validate(self.entityUrlTemplate, name: "entityUrlTemplate", parent: name, min: 1)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.executionUrlTemplate, name: "executionUrlTemplate", parent: name, min: 1)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, max: 2048)
            try self.validate(self.revisionUrlTemplate, name: "revisionUrlTemplate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case configurationUrl = "configurationUrl"
            case entityUrlTemplate = "entityUrlTemplate"
            case executionUrlTemplate = "executionUrlTemplate"
            case revisionUrlTemplate = "revisionUrlTemplate"
        }
    }

    public struct ApprovalResult: AWSEncodableShape {
        /// The response submitted by a reviewer assigned to an approval action request.
        public let status: ApprovalStatus
        /// The summary of the current status of the approval request.
        public let summary: String

        @inlinable
        public init(status: ApprovalStatus, summary: String) {
            self.status = status
            self.summary = summary
        }

        public func validate(name: String) throws {
            try self.validate(self.summary, name: "summary", parent: name, max: 512)
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
            case summary = "summary"
        }
    }

    public struct Artifact: AWSDecodableShape {
        /// The location of an artifact.
        public let location: ArtifactLocation?
        /// The artifact's name.
        public let name: String?
        /// The artifact's revision ID. Depending on the type of object, this could be a commit ID (GitHub) or a revision ID (Amazon S3).
        public let revision: String?

        @inlinable
        public init(location: ArtifactLocation? = nil, name: String? = nil, revision: String? = nil) {
            self.location = location
            self.name = name
            self.revision = revision
        }

        private enum CodingKeys: String, CodingKey {
            case location = "location"
            case name = "name"
            case revision = "revision"
        }
    }

    public struct ArtifactDetail: AWSDecodableShape {
        /// The artifact object name for the action execution.
        public let name: String?
        /// The Amazon S3 artifact location for the action execution.
        public let s3location: S3Location?

        @inlinable
        public init(name: String? = nil, s3location: S3Location? = nil) {
            self.name = name
            self.s3location = s3location
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case s3location = "s3location"
        }
    }

    public struct ArtifactDetails: AWSEncodableShape & AWSDecodableShape {
        /// The maximum number of artifacts allowed for the action type.
        public let maximumCount: Int
        /// The minimum number of artifacts allowed for the action type.
        public let minimumCount: Int

        @inlinable
        public init(maximumCount: Int, minimumCount: Int) {
            self.maximumCount = maximumCount
            self.minimumCount = minimumCount
        }

        public func validate(name: String) throws {
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, max: 5)
            try self.validate(self.maximumCount, name: "maximumCount", parent: name, min: 0)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, max: 5)
            try self.validate(self.minimumCount, name: "minimumCount", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maximumCount = "maximumCount"
            case minimumCount = "minimumCount"
        }
    }

    public struct ArtifactLocation: AWSDecodableShape {
        /// The S3 bucket that contains the artifact.
        public let s3Location: S3ArtifactLocation?
        /// The type of artifact in the location.
        public let type: ArtifactLocationType?

        @inlinable
        public init(s3Location: S3ArtifactLocation? = nil, type: ArtifactLocationType? = nil) {
            self.s3Location = s3Location
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location = "s3Location"
            case type = "type"
        }
    }

    public struct ArtifactRevision: AWSDecodableShape {
        /// The date and time when the most recent revision of the artifact was created, in timestamp format.
        public let created: Date?
        /// The name of an artifact. This name might be system-generated, such as "MyApp", or defined by the user when an action is created.
        public let name: String?
        /// An additional identifier for a revision, such as a commit date or, for artifacts stored in Amazon S3 buckets, the ETag value.
        public let revisionChangeIdentifier: String?
        /// The revision ID of the artifact.
        public let revisionId: String?
        /// Summary information about the most recent revision of the artifact. For GitHub and CodeCommit repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a codepipeline-artifact-revision-summary key specified in the object metadata.
        public let revisionSummary: String?
        /// The commit ID for the artifact revision. For artifacts stored in GitHub or CodeCommit repositories, the commit ID is linked to a commit details page.
        public let revisionUrl: String?

        @inlinable
        public init(created: Date? = nil, name: String? = nil, revisionChangeIdentifier: String? = nil, revisionId: String? = nil, revisionSummary: String? = nil, revisionUrl: String? = nil) {
            self.created = created
            self.name = name
            self.revisionChangeIdentifier = revisionChangeIdentifier
            self.revisionId = revisionId
            self.revisionSummary = revisionSummary
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case name = "name"
            case revisionChangeIdentifier = "revisionChangeIdentifier"
            case revisionId = "revisionId"
            case revisionSummary = "revisionSummary"
            case revisionUrl = "revisionUrl"
        }
    }

    public struct ArtifactStore: AWSEncodableShape & AWSDecodableShape {
        /// The encryption key used to encrypt the data in the artifact store, such as an Amazon Web Services Key Management Service key. If this is undefined, the default key for Amazon S3 is used.
        public let encryptionKey: EncryptionKey?
        /// The S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder in the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any S3 bucket in the same Amazon Web Services Region as the pipeline to store your pipeline artifacts.
        public let location: String
        /// The type of the artifact store, such as S3.
        public let type: ArtifactStoreType

        @inlinable
        public init(encryptionKey: EncryptionKey? = nil, location: String, type: ArtifactStoreType) {
            self.encryptionKey = encryptionKey
            self.location = location
            self.type = type
        }

        public func validate(name: String) throws {
            try self.encryptionKey?.validate(name: "\(name).encryptionKey")
            try self.validate(self.location, name: "location", parent: name, max: 63)
            try self.validate(self.location, name: "location", parent: name, min: 3)
            try self.validate(self.location, name: "location", parent: name, pattern: "^[a-zA-Z0-9\\-\\.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionKey = "encryptionKey"
            case location = "location"
            case type = "type"
        }
    }

    public struct BeforeEntryConditions: AWSEncodableShape & AWSDecodableShape {
        /// The conditions that are configured as entry conditions.
        public let conditions: [Condition]

        @inlinable
        public init(conditions: [Condition]) {
            self.conditions = conditions
        }

        public func validate(name: String) throws {
            try self.conditions.forEach {
                try $0.validate(name: "\(name).conditions[]")
            }
            try self.validate(self.conditions, name: "conditions", parent: name, max: 1)
            try self.validate(self.conditions, name: "conditions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case conditions = "conditions"
        }
    }

    public struct BlockerDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Reserved for future use.
        public let name: String
        /// Reserved for future use.
        public let type: BlockerType

        @inlinable
        public init(name: String, type: BlockerType) {
            self.name = name
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case type = "type"
        }
    }

    public struct Condition: AWSEncodableShape & AWSDecodableShape {
        /// The action to be done when the condition is met. For example, rolling back an execution for a failure condition.
        public let result: Result?
        /// The rules that make up the condition.
        public let rules: [RuleDeclaration]?

        @inlinable
        public init(result: Result? = nil, rules: [RuleDeclaration]? = nil) {
            self.result = result
            self.rules = rules
        }

        public func validate(name: String) throws {
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
            try self.validate(self.rules, name: "rules", parent: name, max: 5)
            try self.validate(self.rules, name: "rules", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case result = "result"
            case rules = "rules"
        }
    }

    public struct ConditionExecution: AWSDecodableShape {
        /// The last status change of the condition.
        public let lastStatusChange: Date?
        /// The status of the run for a condition.
        public let status: ConditionExecutionStatus?
        /// The summary of information about a run for a condition.
        public let summary: String?

        @inlinable
        public init(lastStatusChange: Date? = nil, status: ConditionExecutionStatus? = nil, summary: String? = nil) {
            self.lastStatusChange = lastStatusChange
            self.status = status
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case lastStatusChange = "lastStatusChange"
            case status = "status"
            case summary = "summary"
        }
    }

    public struct ConditionState: AWSDecodableShape {
        /// The state of the latest run of the rule.
        public let latestExecution: ConditionExecution?
        /// The state of the rules for the condition.
        public let ruleStates: [RuleState]?

        @inlinable
        public init(latestExecution: ConditionExecution? = nil, ruleStates: [RuleState]? = nil) {
            self.latestExecution = latestExecution
            self.ruleStates = ruleStates
        }

        private enum CodingKeys: String, CodingKey {
            case latestExecution = "latestExecution"
            case ruleStates = "ruleStates"
        }
    }

    public struct CreateCustomActionTypeInput: AWSEncodableShape {
        /// The category of the custom action, such as a build action or a test action.
        public let category: ActionCategory
        /// The configuration properties for the custom action.  You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.
        public let configurationProperties: [ActionConfigurationProperty]?
        /// The details of the input artifact for the action, such as its commit ID.
        public let inputArtifactDetails: ArtifactDetails
        /// The details of the output artifact of the action, such as its commit ID.
        public let outputArtifactDetails: ArtifactDetails
        /// The provider of the service used in the custom action, such as CodeDeploy.
        public let provider: String
        /// URLs that provide users information about this custom action.
        public let settings: ActionTypeSettings?
        /// The tags for the custom action.
        public let tags: [Tag]?
        /// The version identifier of the custom action.
        public let version: String

        @inlinable
        public init(category: ActionCategory, configurationProperties: [ActionConfigurationProperty]? = nil, inputArtifactDetails: ArtifactDetails, outputArtifactDetails: ArtifactDetails, provider: String, settings: ActionTypeSettings? = nil, tags: [Tag]? = nil, version: String) {
            self.category = category
            self.configurationProperties = configurationProperties
            self.inputArtifactDetails = inputArtifactDetails
            self.outputArtifactDetails = outputArtifactDetails
            self.provider = provider
            self.settings = settings
            self.tags = tags
            self.version = version
        }

        public func validate(name: String) throws {
            try self.configurationProperties?.forEach {
                try $0.validate(name: "\(name).configurationProperties[]")
            }
            try self.validate(self.configurationProperties, name: "configurationProperties", parent: name, max: 10)
            try self.inputArtifactDetails.validate(name: "\(name).inputArtifactDetails")
            try self.outputArtifactDetails.validate(name: "\(name).outputArtifactDetails")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.settings?.validate(name: "\(name).settings")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case configurationProperties = "configurationProperties"
            case inputArtifactDetails = "inputArtifactDetails"
            case outputArtifactDetails = "outputArtifactDetails"
            case provider = "provider"
            case settings = "settings"
            case tags = "tags"
            case version = "version"
        }
    }

    public struct CreateCustomActionTypeOutput: AWSDecodableShape {
        /// Returns information about the details of an action type.
        public let actionType: ActionType
        /// Specifies the tags applied to the custom action.
        public let tags: [Tag]?

        @inlinable
        public init(actionType: ActionType, tags: [Tag]? = nil) {
            self.actionType = actionType
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "actionType"
            case tags = "tags"
        }
    }

    public struct CreatePipelineInput: AWSEncodableShape {
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration
        /// The tags for the pipeline.
        public let tags: [Tag]?

        @inlinable
        public init(pipeline: PipelineDeclaration, tags: [Tag]? = nil) {
            self.pipeline = pipeline
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.pipeline.validate(name: "\(name).pipeline")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline = "pipeline"
            case tags = "tags"
        }
    }

    public struct CreatePipelineOutput: AWSDecodableShape {
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration?
        /// Specifies the tags applied to the pipeline.
        public let tags: [Tag]?

        @inlinable
        public init(pipeline: PipelineDeclaration? = nil, tags: [Tag]? = nil) {
            self.pipeline = pipeline
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline = "pipeline"
            case tags = "tags"
        }
    }

    public struct CurrentRevision: AWSEncodableShape {
        /// The change identifier for the current revision.
        public let changeIdentifier: String
        /// The date and time when the most recent revision of the artifact was created, in timestamp format.
        public let created: Date?
        /// The revision ID of the current version of an artifact.
        public let revision: String
        /// The summary of the most recent revision of the artifact.
        public let revisionSummary: String?

        @inlinable
        public init(changeIdentifier: String, created: Date? = nil, revision: String, revisionSummary: String? = nil) {
            self.changeIdentifier = changeIdentifier
            self.created = created
            self.revision = revision
            self.revisionSummary = revisionSummary
        }

        public func validate(name: String) throws {
            try self.validate(self.changeIdentifier, name: "changeIdentifier", parent: name, max: 100)
            try self.validate(self.changeIdentifier, name: "changeIdentifier", parent: name, min: 1)
            try self.validate(self.revision, name: "revision", parent: name, max: 1500)
            try self.validate(self.revision, name: "revision", parent: name, min: 1)
            try self.validate(self.revisionSummary, name: "revisionSummary", parent: name, max: 2048)
            try self.validate(self.revisionSummary, name: "revisionSummary", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case changeIdentifier = "changeIdentifier"
            case created = "created"
            case revision = "revision"
            case revisionSummary = "revisionSummary"
        }
    }

    public struct DeleteCustomActionTypeInput: AWSEncodableShape {
        /// The category of the custom action that you want to delete, such as source or deploy.
        public let category: ActionCategory
        /// The provider of the service used in the custom action, such as CodeDeploy.
        public let provider: String
        /// The version of the custom action to delete.
        public let version: String

        @inlinable
        public init(category: ActionCategory, provider: String, version: String) {
            self.category = category
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case provider = "provider"
            case version = "version"
        }
    }

    public struct DeletePipelineInput: AWSEncodableShape {
        /// The name of the pipeline to be deleted.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct DeleteWebhookInput: AWSEncodableShape {
        /// The name of the webhook you want to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct DeleteWebhookOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeployActionExecutionTarget: AWSDecodableShape {
        /// The end time for the deploy action.
        public let endTime: Date?
        /// The lifecycle events for the deploy action.
        public let events: [DeployTargetEvent]?
        /// The start time for the deploy action.
        public let startTime: Date?
        /// The status of the deploy action.
        public let status: String?
        /// The ID of the target for the deploy action.
        public let targetId: String?
        /// The type of target for the deploy action.
        public let targetType: String?

        @inlinable
        public init(endTime: Date? = nil, events: [DeployTargetEvent]? = nil, startTime: Date? = nil, status: String? = nil, targetId: String? = nil, targetType: String? = nil) {
            self.endTime = endTime
            self.events = events
            self.startTime = startTime
            self.status = status
            self.targetId = targetId
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "endTime"
            case events = "events"
            case startTime = "startTime"
            case status = "status"
            case targetId = "targetId"
            case targetType = "targetType"
        }
    }

    public struct DeployTargetEvent: AWSDecodableShape {
        /// The context for the event for the deploy action.
        public let context: DeployTargetEventContext?
        /// The end time for the event for the deploy action.
        public let endTime: Date?
        /// The name of the event for the deploy action.
        public let name: String?
        /// The start time for the event for the deploy action.
        public let startTime: Date?
        /// The status of the event for the deploy action.
        public let status: String?

        @inlinable
        public init(context: DeployTargetEventContext? = nil, endTime: Date? = nil, name: String? = nil, startTime: Date? = nil, status: String? = nil) {
            self.context = context
            self.endTime = endTime
            self.name = name
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case context = "context"
            case endTime = "endTime"
            case name = "name"
            case startTime = "startTime"
            case status = "status"
        }
    }

    public struct DeployTargetEventContext: AWSDecodableShape {
        /// The context message for the event for the deploy action.
        public let message: String?
        /// The command ID for the event for the deploy action.
        public let ssmCommandId: String?

        @inlinable
        public init(message: String? = nil, ssmCommandId: String? = nil) {
            self.message = message
            self.ssmCommandId = ssmCommandId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case ssmCommandId = "ssmCommandId"
        }
    }

    public struct DeregisterWebhookWithThirdPartyInput: AWSEncodableShape {
        /// The name of the webhook you want to deregister.
        public let webhookName: String?

        @inlinable
        public init(webhookName: String? = nil) {
            self.webhookName = webhookName
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookName, name: "webhookName", parent: name, max: 100)
            try self.validate(self.webhookName, name: "webhookName", parent: name, min: 1)
            try self.validate(self.webhookName, name: "webhookName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case webhookName = "webhookName"
        }
    }

    public struct DeregisterWebhookWithThirdPartyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DisableStageTransitionInput: AWSEncodableShape {
        /// The name of the pipeline in which you want to disable the flow of artifacts from one stage to another.
        public let pipelineName: String
        /// The reason given to the user that a stage is disabled, such as waiting for manual approval or manual tests. This message is displayed in the pipeline console UI.
        public let reason: String
        /// The name of the stage where you want to disable the inbound or outbound transition of artifacts.
        public let stageName: String
        /// Specifies whether artifacts are prevented from transitioning into the stage and being processed by the actions in that stage (inbound), or prevented from transitioning from the stage after they have been processed by the actions in that stage (outbound).
        public let transitionType: StageTransitionType

        @inlinable
        public init(pipelineName: String, reason: String, stageName: String, transitionType: StageTransitionType) {
            self.pipelineName = pipelineName
            self.reason = reason
            self.stageName = stageName
            self.transitionType = transitionType
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.reason, name: "reason", parent: name, max: 300)
            try self.validate(self.reason, name: "reason", parent: name, min: 1)
            try self.validate(self.reason, name: "reason", parent: name, pattern: "^[a-zA-Z0-9!@ \\(\\)\\.\\*\\?\\-]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineName = "pipelineName"
            case reason = "reason"
            case stageName = "stageName"
            case transitionType = "transitionType"
        }
    }

    public struct EnableStageTransitionInput: AWSEncodableShape {
        /// The name of the pipeline in which you want to enable the flow of artifacts from one stage to another.
        public let pipelineName: String
        /// The name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).
        public let stageName: String
        /// Specifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).
        public let transitionType: StageTransitionType

        @inlinable
        public init(pipelineName: String, stageName: String, transitionType: StageTransitionType) {
            self.pipelineName = pipelineName
            self.stageName = stageName
            self.transitionType = transitionType
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineName = "pipelineName"
            case stageName = "stageName"
            case transitionType = "transitionType"
        }
    }

    public struct EncryptionKey: AWSEncodableShape & AWSDecodableShape {
        /// The ID used to identify the key. For an Amazon Web Services KMS key, you can use the key ID, the key ARN, or the alias ARN.  Aliases are recognized only in the account that created the KMS key. For cross-account actions, you can only use the key ID or key ARN to identify the key. Cross-account actions involve using the role from the other account (AccountB), so specifying the key ID will use the key from the other account (AccountB).
        public let id: String
        /// The type of encryption key, such as an Amazon Web Services KMS key. When creating or updating a pipeline, the value must be set to 'KMS'.
        public let type: EncryptionKeyType

        @inlinable
        public init(id: String, type: EncryptionKeyType) {
            self.id = id
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 400)
            try self.validate(self.id, name: "id", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case type = "type"
        }
    }

    public struct EnvironmentVariable: AWSEncodableShape & AWSDecodableShape {
        /// The environment variable name in the key-value pair.
        public let name: String
        /// Specifies the type of use for the environment variable value. The value can be either PLAINTEXT or SECRETS_MANAGER. If the value is SECRETS_MANAGER, provide the Secrets reference in the EnvironmentVariable value.
        public let type: EnvironmentVariableType?
        /// The environment variable value in the key-value pair.
        public let value: String

        @inlinable
        public init(name: String, type: EnvironmentVariableType? = nil, value: String) {
            self.name = name
            self.type = type
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9_]+$")
            try self.validate(self.value, name: "value", parent: name, max: 2000)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case type = "type"
            case value = "value"
        }
    }

    public struct ErrorDetails: AWSDecodableShape {
        /// The system ID or number code of the error.
        public let code: String?
        /// The text of the error message.
        public let message: String?

        @inlinable
        public init(code: String? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "code"
            case message = "message"
        }
    }

    public struct ExecutionDetails: AWSEncodableShape {
        /// The system-generated unique ID of this action used to identify this job worker in any external systems, such as CodeDeploy.
        public let externalExecutionId: String?
        /// The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
        public let percentComplete: Int?
        /// The summary of the current status of the actions.
        public let summary: String?

        @inlinable
        public init(externalExecutionId: String? = nil, percentComplete: Int? = nil, summary: String? = nil) {
            self.externalExecutionId = externalExecutionId
            self.percentComplete = percentComplete
            self.summary = summary
        }

        public func validate(name: String) throws {
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, max: 1500)
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, min: 1)
            try self.validate(self.percentComplete, name: "percentComplete", parent: name, max: 100)
            try self.validate(self.percentComplete, name: "percentComplete", parent: name, min: 0)
            try self.validate(self.summary, name: "summary", parent: name, max: 2048)
            try self.validate(self.summary, name: "summary", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case externalExecutionId = "externalExecutionId"
            case percentComplete = "percentComplete"
            case summary = "summary"
        }
    }

    public struct ExecutionTrigger: AWSDecodableShape {
        /// Detail related to the event that started a pipeline execution, such as the webhook ARN of the webhook that triggered the pipeline execution or the user ARN for a user-initiated start-pipeline-execution CLI command.
        public let triggerDetail: String?
        /// The type of change-detection method, command, or user interaction that started a pipeline execution.
        public let triggerType: TriggerType?

        @inlinable
        public init(triggerDetail: String? = nil, triggerType: TriggerType? = nil) {
            self.triggerDetail = triggerDetail
            self.triggerType = triggerType
        }

        private enum CodingKeys: String, CodingKey {
            case triggerDetail = "triggerDetail"
            case triggerType = "triggerType"
        }
    }

    public struct ExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Details about the JobWorker executor of the action type.
        public let jobWorkerExecutorConfiguration: JobWorkerExecutorConfiguration?
        /// Details about the Lambda executor of the action type.
        public let lambdaExecutorConfiguration: LambdaExecutorConfiguration?

        @inlinable
        public init(jobWorkerExecutorConfiguration: JobWorkerExecutorConfiguration? = nil, lambdaExecutorConfiguration: LambdaExecutorConfiguration? = nil) {
            self.jobWorkerExecutorConfiguration = jobWorkerExecutorConfiguration
            self.lambdaExecutorConfiguration = lambdaExecutorConfiguration
        }

        public func validate(name: String) throws {
            try self.jobWorkerExecutorConfiguration?.validate(name: "\(name).jobWorkerExecutorConfiguration")
            try self.lambdaExecutorConfiguration?.validate(name: "\(name).lambdaExecutorConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case jobWorkerExecutorConfiguration = "jobWorkerExecutorConfiguration"
            case lambdaExecutorConfiguration = "lambdaExecutorConfiguration"
        }
    }

    public struct FailureConditions: AWSEncodableShape & AWSDecodableShape {
        /// The conditions that are configured as failure conditions. For more information about conditions, see Stage conditions and How do stage conditions work?.
        public let conditions: [Condition]?
        /// The specified result for when the failure conditions are met, such as rolling back the stage.
        public let result: Result?
        /// The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode.
        public let retryConfiguration: RetryConfiguration?

        @inlinable
        public init(conditions: [Condition]? = nil, result: Result? = nil, retryConfiguration: RetryConfiguration? = nil) {
            self.conditions = conditions
            self.result = result
            self.retryConfiguration = retryConfiguration
        }

        public func validate(name: String) throws {
            try self.conditions?.forEach {
                try $0.validate(name: "\(name).conditions[]")
            }
            try self.validate(self.conditions, name: "conditions", parent: name, max: 1)
            try self.validate(self.conditions, name: "conditions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case conditions = "conditions"
            case result = "result"
            case retryConfiguration = "retryConfiguration"
        }
    }

    public struct FailureDetails: AWSEncodableShape {
        /// The external ID of the run of the action that failed.
        public let externalExecutionId: String?
        /// The message about the failure.
        public let message: String
        /// The type of the failure.
        public let type: FailureType

        @inlinable
        public init(externalExecutionId: String? = nil, message: String, type: FailureType) {
            self.externalExecutionId = externalExecutionId
            self.message = message
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, max: 1500)
            try self.validate(self.externalExecutionId, name: "externalExecutionId", parent: name, min: 1)
            try self.validate(self.message, name: "message", parent: name, max: 5000)
            try self.validate(self.message, name: "message", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case externalExecutionId = "externalExecutionId"
            case message = "message"
            case type = "type"
        }
    }

    public struct GetActionTypeInput: AWSEncodableShape {
        /// Defines what kind of action can be taken in the stage. The following are the valid values:    Source     Build     Test     Deploy     Approval     Invoke     Compute
        public let category: ActionCategory
        /// The creator of an action type that was created with any supported integration model. There are two valid values: AWS and ThirdParty.
        public let owner: String
        /// The provider of the action type being called. The provider name is specified when the action type is created.
        public let provider: String
        /// A string that describes the action type version.
        public let version: String

        @inlinable
        public init(category: ActionCategory, owner: String, provider: String, version: String) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.owner, name: "owner", parent: name, pattern: "^AWS|ThirdParty$")
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case owner = "owner"
            case provider = "provider"
            case version = "version"
        }
    }

    public struct GetActionTypeOutput: AWSDecodableShape {
        /// The action type information for the requested action type, such as the action type ID.
        public let actionType: ActionTypeDeclaration?

        @inlinable
        public init(actionType: ActionTypeDeclaration? = nil) {
            self.actionType = actionType
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "actionType"
        }
    }

    public struct GetJobDetailsInput: AWSEncodableShape {
        /// The unique system-generated ID for the job.
        public let jobId: String

        @inlinable
        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "jobId"
        }
    }

    public struct GetJobDetailsOutput: AWSDecodableShape {
        /// The details of the job.  If AWSSessionCredentials is used, a long-running job can call GetJobDetails again to obtain new credentials.
        public let jobDetails: JobDetails?

        @inlinable
        public init(jobDetails: JobDetails? = nil) {
            self.jobDetails = jobDetails
        }

        private enum CodingKeys: String, CodingKey {
            case jobDetails = "jobDetails"
        }
    }

    public struct GetPipelineExecutionInput: AWSEncodableShape {
        /// The ID of the pipeline execution about which you want to get execution details.
        public let pipelineExecutionId: String
        /// The name of the pipeline about which you want to get execution details.
        public let pipelineName: String

        @inlinable
        public init(pipelineExecutionId: String, pipelineName: String) {
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
        }
    }

    public struct GetPipelineExecutionOutput: AWSDecodableShape {
        /// Represents information about the execution of a pipeline.
        public let pipelineExecution: PipelineExecution?

        @inlinable
        public init(pipelineExecution: PipelineExecution? = nil) {
            self.pipelineExecution = pipelineExecution
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecution = "pipelineExecution"
        }
    }

    public struct GetPipelineInput: AWSEncodableShape {
        /// The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.
        public let name: String
        /// The version number of the pipeline. If you do not specify a version, defaults to the current version.
        public let version: Int?

        @inlinable
        public init(name: String, version: Int? = nil) {
            self.name = name
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.version, name: "version", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case version = "version"
        }
    }

    public struct GetPipelineOutput: AWSDecodableShape {
        /// Represents the pipeline metadata information returned as part of the output of a GetPipeline action.
        public let metadata: PipelineMetadata?
        /// Represents the structure of actions and stages to be performed in the pipeline.
        public let pipeline: PipelineDeclaration?

        @inlinable
        public init(metadata: PipelineMetadata? = nil, pipeline: PipelineDeclaration? = nil) {
            self.metadata = metadata
            self.pipeline = pipeline
        }

        private enum CodingKeys: String, CodingKey {
            case metadata = "metadata"
            case pipeline = "pipeline"
        }
    }

    public struct GetPipelineStateInput: AWSEncodableShape {
        /// The name of the pipeline about which you want to get information.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct GetPipelineStateOutput: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The name of the pipeline for which you want to get the state.
        public let pipelineName: String?
        /// The version number of the pipeline.  A newly created pipeline is always assigned a version number of 1.
        public let pipelineVersion: Int?
        /// A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.
        public let stageStates: [StageState]?
        /// The date and time the pipeline was last updated, in timestamp format.
        public let updated: Date?

        @inlinable
        public init(created: Date? = nil, pipelineName: String? = nil, pipelineVersion: Int? = nil, stageStates: [StageState]? = nil, updated: Date? = nil) {
            self.created = created
            self.pipelineName = pipelineName
            self.pipelineVersion = pipelineVersion
            self.stageStates = stageStates
            self.updated = updated
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case pipelineName = "pipelineName"
            case pipelineVersion = "pipelineVersion"
            case stageStates = "stageStates"
            case updated = "updated"
        }
    }

    public struct GetThirdPartyJobDetailsInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// The unique system-generated ID used for identifying the job.
        public let jobId: String

        @inlinable
        public init(clientToken: String, jobId: String) {
            self.clientToken = clientToken
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case jobId = "jobId"
        }
    }

    public struct GetThirdPartyJobDetailsOutput: AWSDecodableShape {
        /// The details of the job, including any protected values defined for the job.
        public let jobDetails: ThirdPartyJobDetails?

        @inlinable
        public init(jobDetails: ThirdPartyJobDetails? = nil) {
            self.jobDetails = jobDetails
        }

        private enum CodingKeys: String, CodingKey {
            case jobDetails = "jobDetails"
        }
    }

    public struct GitBranchFilterCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The list of patterns of Git branches that, when a commit is pushed, are to be excluded from starting the pipeline.
        public let excludes: [String]?
        /// The list of patterns of Git branches that, when a commit is pushed, are to be included as criteria that starts the pipeline.
        public let includes: [String]?

        @inlinable
        public init(excludes: [String]? = nil, includes: [String]? = nil) {
            self.excludes = excludes
            self.includes = includes
        }

        public func validate(name: String) throws {
            try self.excludes?.forEach {
                try validate($0, name: "excludes[]", parent: name, max: 255)
                try validate($0, name: "excludes[]", parent: name, min: 1)
                try validate($0, name: "excludes[]", parent: name, pattern: ".*")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 8)
            try self.validate(self.excludes, name: "excludes", parent: name, min: 1)
            try self.includes?.forEach {
                try validate($0, name: "includes[]", parent: name, max: 255)
                try validate($0, name: "includes[]", parent: name, min: 1)
                try validate($0, name: "includes[]", parent: name, pattern: ".*")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 8)
            try self.validate(self.includes, name: "includes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case excludes = "excludes"
            case includes = "includes"
        }
    }

    public struct GitConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The field where the repository event that will start the pipeline is specified as pull requests.
        public let pullRequest: [GitPullRequestFilter]?
        /// The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with details.
        public let push: [GitPushFilter]?
        /// The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. The trigger configuration will start the pipeline upon the specified change only.  You can only specify one trigger configuration per source action.
        public let sourceActionName: String

        @inlinable
        public init(pullRequest: [GitPullRequestFilter]? = nil, push: [GitPushFilter]? = nil, sourceActionName: String) {
            self.pullRequest = pullRequest
            self.push = push
            self.sourceActionName = sourceActionName
        }

        public func validate(name: String) throws {
            try self.pullRequest?.forEach {
                try $0.validate(name: "\(name).pullRequest[]")
            }
            try self.validate(self.pullRequest, name: "pullRequest", parent: name, max: 3)
            try self.validate(self.pullRequest, name: "pullRequest", parent: name, min: 1)
            try self.push?.forEach {
                try $0.validate(name: "\(name).push[]")
            }
            try self.validate(self.push, name: "push", parent: name, max: 3)
            try self.validate(self.push, name: "push", parent: name, min: 1)
            try self.validate(self.sourceActionName, name: "sourceActionName", parent: name, max: 100)
            try self.validate(self.sourceActionName, name: "sourceActionName", parent: name, min: 1)
            try self.validate(self.sourceActionName, name: "sourceActionName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case pullRequest = "pullRequest"
            case push = "push"
            case sourceActionName = "sourceActionName"
        }
    }

    public struct GitFilePathFilterCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The list of patterns of Git repository file paths that, when a commit is pushed, are to be excluded from starting the pipeline.
        public let excludes: [String]?
        /// The list of patterns of Git repository file paths that, when a commit is pushed, are to be included as criteria that starts the pipeline.
        public let includes: [String]?

        @inlinable
        public init(excludes: [String]? = nil, includes: [String]? = nil) {
            self.excludes = excludes
            self.includes = includes
        }

        public func validate(name: String) throws {
            try self.excludes?.forEach {
                try validate($0, name: "excludes[]", parent: name, max: 255)
                try validate($0, name: "excludes[]", parent: name, min: 1)
                try validate($0, name: "excludes[]", parent: name, pattern: ".*")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 8)
            try self.validate(self.excludes, name: "excludes", parent: name, min: 1)
            try self.includes?.forEach {
                try validate($0, name: "includes[]", parent: name, max: 255)
                try validate($0, name: "includes[]", parent: name, min: 1)
                try validate($0, name: "includes[]", parent: name, pattern: ".*")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 8)
            try self.validate(self.includes, name: "includes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case excludes = "excludes"
            case includes = "includes"
        }
    }

    public struct GitPullRequestFilter: AWSEncodableShape & AWSDecodableShape {
        /// The field that specifies to filter on branches for the pull request trigger configuration.
        public let branches: GitBranchFilterCriteria?
        /// The field that specifies which pull request events to filter on (OPEN, UPDATED, CLOSED) for the trigger configuration.
        public let events: [GitPullRequestEventType]?
        /// The field that specifies to filter on file paths for the pull request trigger configuration.
        public let filePaths: GitFilePathFilterCriteria?

        @inlinable
        public init(branches: GitBranchFilterCriteria? = nil, events: [GitPullRequestEventType]? = nil, filePaths: GitFilePathFilterCriteria? = nil) {
            self.branches = branches
            self.events = events
            self.filePaths = filePaths
        }

        public func validate(name: String) throws {
            try self.branches?.validate(name: "\(name).branches")
            try self.validate(self.events, name: "events", parent: name, max: 3)
            try self.validate(self.events, name: "events", parent: name, min: 1)
            try self.filePaths?.validate(name: "\(name).filePaths")
        }

        private enum CodingKeys: String, CodingKey {
            case branches = "branches"
            case events = "events"
            case filePaths = "filePaths"
        }
    }

    public struct GitPushFilter: AWSEncodableShape & AWSDecodableShape {
        /// The field that specifies to filter on branches for the push trigger configuration.
        public let branches: GitBranchFilterCriteria?
        /// The field that specifies to filter on file paths for the push trigger configuration.
        public let filePaths: GitFilePathFilterCriteria?
        /// The field that contains the details for the Git tags trigger configuration.
        public let tags: GitTagFilterCriteria?

        @inlinable
        public init(branches: GitBranchFilterCriteria? = nil, filePaths: GitFilePathFilterCriteria? = nil, tags: GitTagFilterCriteria? = nil) {
            self.branches = branches
            self.filePaths = filePaths
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.branches?.validate(name: "\(name).branches")
            try self.filePaths?.validate(name: "\(name).filePaths")
            try self.tags?.validate(name: "\(name).tags")
        }

        private enum CodingKeys: String, CodingKey {
            case branches = "branches"
            case filePaths = "filePaths"
            case tags = "tags"
        }
    }

    public struct GitTagFilterCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The list of patterns of Git tags that, when pushed, are to be excluded from starting the pipeline.
        public let excludes: [String]?
        /// The list of patterns of Git tags that, when pushed, are to be included as criteria that starts the pipeline.
        public let includes: [String]?

        @inlinable
        public init(excludes: [String]? = nil, includes: [String]? = nil) {
            self.excludes = excludes
            self.includes = includes
        }

        public func validate(name: String) throws {
            try self.excludes?.forEach {
                try validate($0, name: "excludes[]", parent: name, max: 255)
                try validate($0, name: "excludes[]", parent: name, min: 1)
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 8)
            try self.validate(self.excludes, name: "excludes", parent: name, min: 1)
            try self.includes?.forEach {
                try validate($0, name: "includes[]", parent: name, max: 255)
                try validate($0, name: "includes[]", parent: name, min: 1)
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 8)
            try self.validate(self.includes, name: "includes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case excludes = "excludes"
            case includes = "includes"
        }
    }

    public struct InputArtifact: AWSEncodableShape & AWSDecodableShape {
        /// The name of the artifact to be worked on (for example, "My App"). Artifacts are the files that are worked on by actions in the pipeline. See the action configuration for each action for details about artifact parameters. For example, the S3 source action input artifact is a file name (or file path), and the files are generally provided as a ZIP file. Example artifact name: SampleApp_Windows.zip The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9_\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct Job: AWSDecodableShape {
        /// The ID of the Amazon Web Services account to use when performing the job.
        public let accountId: String?
        /// Other data about a job.
        public let data: JobData?
        /// The unique system-generated ID of the job.
        public let id: String?
        /// A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an AcknowledgeJob request.
        public let nonce: String?

        @inlinable
        public init(accountId: String? = nil, data: JobData? = nil, id: String? = nil, nonce: String? = nil) {
            self.accountId = accountId
            self.data = data
            self.id = id
            self.nonce = nonce
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case data = "data"
            case id = "id"
            case nonce = "nonce"
        }
    }

    public struct JobData: AWSDecodableShape {
        /// Represents information about an action configuration.
        public let actionConfiguration: ActionConfiguration?
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId?
        /// Represents an Amazon Web Services session credentials object. These credentials are temporary credentials that are issued by Amazon Web Services Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store artifacts for the pipeline in CodePipeline.
        public let artifactCredentials: AWSSessionCredentials?
        /// A system-generated token, such as a deployment ID, required by a job to continue the job asynchronously.
        public let continuationToken: String?
        /// Represents information about the key used to encrypt data in the artifact store, such as an KMS key.
        public let encryptionKey: EncryptionKey?
        /// The artifact supplied to the job.
        public let inputArtifacts: [Artifact]?
        /// The output of the job.
        public let outputArtifacts: [Artifact]?
        /// Represents information about a pipeline to a job worker.  Includes pipelineArn and pipelineExecutionId for custom jobs.
        public let pipelineContext: PipelineContext?

        @inlinable
        public init(actionConfiguration: ActionConfiguration? = nil, actionTypeId: ActionTypeId? = nil, artifactCredentials: AWSSessionCredentials? = nil, continuationToken: String? = nil, encryptionKey: EncryptionKey? = nil, inputArtifacts: [Artifact]? = nil, outputArtifacts: [Artifact]? = nil, pipelineContext: PipelineContext? = nil) {
            self.actionConfiguration = actionConfiguration
            self.actionTypeId = actionTypeId
            self.artifactCredentials = artifactCredentials
            self.continuationToken = continuationToken
            self.encryptionKey = encryptionKey
            self.inputArtifacts = inputArtifacts
            self.outputArtifacts = outputArtifacts
            self.pipelineContext = pipelineContext
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfiguration = "actionConfiguration"
            case actionTypeId = "actionTypeId"
            case artifactCredentials = "artifactCredentials"
            case continuationToken = "continuationToken"
            case encryptionKey = "encryptionKey"
            case inputArtifacts = "inputArtifacts"
            case outputArtifacts = "outputArtifacts"
            case pipelineContext = "pipelineContext"
        }
    }

    public struct JobDetails: AWSDecodableShape {
        /// The Amazon Web Services account ID associated with the job.
        public let accountId: String?
        /// Represents other information about a job required for a job worker to complete the job.
        public let data: JobData?
        /// The unique system-generated ID of the job.
        public let id: String?

        @inlinable
        public init(accountId: String? = nil, data: JobData? = nil, id: String? = nil) {
            self.accountId = accountId
            self.data = data
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case data = "data"
            case id = "id"
        }
    }

    public struct JobWorkerExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The accounts in which the job worker is configured and might poll for jobs as part of the action execution.
        public let pollingAccounts: [String]?
        /// The service Principals in which the job worker is configured and might poll for jobs as part of the action execution.
        public let pollingServicePrincipals: [String]?

        @inlinable
        public init(pollingAccounts: [String]? = nil, pollingServicePrincipals: [String]? = nil) {
            self.pollingAccounts = pollingAccounts
            self.pollingServicePrincipals = pollingServicePrincipals
        }

        public func validate(name: String) throws {
            try self.pollingAccounts?.forEach {
                try validate($0, name: "pollingAccounts[]", parent: name, pattern: "^[0-9]{12}$")
            }
            try self.validate(self.pollingAccounts, name: "pollingAccounts", parent: name, max: 1000)
            try self.validate(self.pollingAccounts, name: "pollingAccounts", parent: name, min: 1)
            try self.pollingServicePrincipals?.forEach {
                try validate($0, name: "pollingServicePrincipals[]", parent: name, max: 128)
                try validate($0, name: "pollingServicePrincipals[]", parent: name, min: 1)
            }
            try self.validate(self.pollingServicePrincipals, name: "pollingServicePrincipals", parent: name, max: 10)
            try self.validate(self.pollingServicePrincipals, name: "pollingServicePrincipals", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pollingAccounts = "pollingAccounts"
            case pollingServicePrincipals = "pollingServicePrincipals"
        }
    }

    public struct LambdaExecutorConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Lambda function used by the action engine.
        public let lambdaFunctionArn: String

        @inlinable
        public init(lambdaFunctionArn: String) {
            self.lambdaFunctionArn = lambdaFunctionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, max: 140)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, min: 1)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:lambda:.+:[0-9]{12}:function:.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaFunctionArn = "lambdaFunctionArn"
        }
    }

    public struct LatestInPipelineExecutionFilter: AWSEncodableShape {
        /// The execution ID for the latest execution in the pipeline.
        public let pipelineExecutionId: String
        /// The start time to filter on for the latest execution in the pipeline. Valid options:   All   Latest
        public let startTimeRange: StartTimeRange

        @inlinable
        public init(pipelineExecutionId: String, startTimeRange: StartTimeRange) {
            self.pipelineExecutionId = pipelineExecutionId
            self.startTimeRange = startTimeRange
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
            case startTimeRange = "startTimeRange"
        }
    }

    public struct ListActionExecutionsInput: AWSEncodableShape {
        /// Input information used to filter action execution history.
        public let filter: ActionExecutionFilter?
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Action execution history is retained for up to 12 months, based on action execution start times. Default value is 100.
        public let maxResults: Int?
        /// The token that was returned from the previous ListActionExecutions call, which can be used to return the next set of action executions in the list.
        public let nextToken: String?
        ///  The name of the pipeline for which you want to list action execution history.
        public let pipelineName: String

        @inlinable
        public init(filter: ActionExecutionFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "filter"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case pipelineName = "pipelineName"
        }
    }

    public struct ListActionExecutionsOutput: AWSDecodableShape {
        /// The details for a list of recent executions, such as action execution ID.
        public let actionExecutionDetails: [ActionExecutionDetail]?
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListActionExecutions call to return the next set of action executions in the list.
        public let nextToken: String?

        @inlinable
        public init(actionExecutionDetails: [ActionExecutionDetail]? = nil, nextToken: String? = nil) {
            self.actionExecutionDetails = actionExecutionDetails
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionDetails = "actionExecutionDetails"
            case nextToken = "nextToken"
        }
    }

    public struct ListActionTypesInput: AWSEncodableShape {
        /// Filters the list of action types to those created by a specified entity.
        public let actionOwnerFilter: ActionOwner?
        /// An identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.
        public let nextToken: String?
        /// The Region to filter on for the list of action types.
        public let regionFilter: String?

        @inlinable
        public init(actionOwnerFilter: ActionOwner? = nil, nextToken: String? = nil, regionFilter: String? = nil) {
            self.actionOwnerFilter = actionOwnerFilter
            self.nextToken = nextToken
            self.regionFilter = regionFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, max: 30)
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, min: 4)
        }

        private enum CodingKeys: String, CodingKey {
            case actionOwnerFilter = "actionOwnerFilter"
            case nextToken = "nextToken"
            case regionFilter = "regionFilter"
        }
    }

    public struct ListActionTypesOutput: AWSDecodableShape {
        /// Provides details of the action types.
        public let actionTypes: [ActionType]
        /// If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list action types call to return the next set of action types in the list.
        public let nextToken: String?

        @inlinable
        public init(actionTypes: [ActionType], nextToken: String? = nil) {
            self.actionTypes = actionTypes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypes = "actionTypes"
            case nextToken = "nextToken"
        }
    }

    public struct ListDeployActionExecutionTargetsInput: AWSEncodableShape {
        /// The execution ID for the deploy action.
        public let actionExecutionId: String
        /// Filters the targets for a specified deploy action.
        public let filters: [TargetFilter]?
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// An identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.
        public let nextToken: String?
        /// The name of the pipeline with the deploy action.
        public let pipelineName: String?

        @inlinable
        public init(actionExecutionId: String, filters: [TargetFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String? = nil) {
            self.actionExecutionId = actionExecutionId
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionExecutionId = "actionExecutionId"
            case filters = "filters"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case pipelineName = "pipelineName"
        }
    }

    public struct ListDeployActionExecutionTargetsOutput: AWSDecodableShape {
        /// An identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.
        public let nextToken: String?
        /// The targets for the deploy action.
        public let targets: [DeployActionExecutionTarget]?

        @inlinable
        public init(nextToken: String? = nil, targets: [DeployActionExecutionTarget]? = nil) {
            self.nextToken = nextToken
            self.targets = targets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case targets = "targets"
        }
    }

    public struct ListPipelineExecutionsInput: AWSEncodableShape {
        /// The pipeline execution to filter on.
        public let filter: PipelineExecutionFilter?
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.
        public let maxResults: Int?
        /// The token that was returned from the previous ListPipelineExecutions call, which can be used to return the next set of pipeline executions in the list.
        public let nextToken: String?
        /// The name of the pipeline for which you want to get execution summary information.
        public let pipelineName: String

        @inlinable
        public init(filter: PipelineExecutionFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "filter"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case pipelineName = "pipelineName"
        }
    }

    public struct ListPipelineExecutionsOutput: AWSDecodableShape {
        /// A token that can be used in the next ListPipelineExecutions call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
        public let nextToken: String?
        /// A list of executions in the history of a pipeline.
        public let pipelineExecutionSummaries: [PipelineExecutionSummary]?

        @inlinable
        public init(nextToken: String? = nil, pipelineExecutionSummaries: [PipelineExecutionSummary]? = nil) {
            self.nextToken = nextToken
            self.pipelineExecutionSummaries = pipelineExecutionSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case pipelineExecutionSummaries = "pipelineExecutionSummaries"
        }
    }

    public struct ListPipelinesInput: AWSEncodableShape {
        /// The maximum number of pipelines to return in a single call. To retrieve the remaining pipelines, make another call with the returned nextToken value. The minimum value you can specify is 1. The maximum accepted value is 1000.
        public let maxResults: Int?
        /// An identifier that was returned from the previous list pipelines call. It can be used to return the next set of pipelines in the list.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
        }
    }

    public struct ListPipelinesOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned. It can be used in a subsequent list pipelines call to return the next set of pipelines in the list.
        public let nextToken: String?
        /// The list of pipelines.
        public let pipelines: [PipelineSummary]?

        @inlinable
        public init(nextToken: String? = nil, pipelines: [PipelineSummary]? = nil) {
            self.nextToken = nextToken
            self.pipelines = pipelines
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case pipelines = "pipelines"
        }
    }

    public struct ListRuleExecutionsInput: AWSEncodableShape {
        /// Input information used to filter rule execution history.
        public let filter: RuleExecutionFilter?
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.
        public let maxResults: Int?
        /// The token that was returned from the previous ListRuleExecutions call, which can be used to return the next set of rule executions in the list.
        public let nextToken: String?
        /// The name of the pipeline for which you want to get execution summary information.
        public let pipelineName: String

        @inlinable
        public init(filter: RuleExecutionFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil, pipelineName: String) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.pipelineName = pipelineName
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "filter"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case pipelineName = "pipelineName"
        }
    }

    public struct ListRuleExecutionsOutput: AWSDecodableShape {
        /// A token that can be used in the next ListRuleExecutions call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
        public let nextToken: String?
        /// Details about the output for listing rule executions.
        public let ruleExecutionDetails: [RuleExecutionDetail]?

        @inlinable
        public init(nextToken: String? = nil, ruleExecutionDetails: [RuleExecutionDetail]? = nil) {
            self.nextToken = nextToken
            self.ruleExecutionDetails = ruleExecutionDetails
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case ruleExecutionDetails = "ruleExecutionDetails"
        }
    }

    public struct ListRuleTypesInput: AWSEncodableShape {
        /// The rule Region to filter on.
        public let regionFilter: String?
        /// The rule owner to filter on.
        public let ruleOwnerFilter: RuleOwner?

        @inlinable
        public init(regionFilter: String? = nil, ruleOwnerFilter: RuleOwner? = nil) {
            self.regionFilter = regionFilter
            self.ruleOwnerFilter = ruleOwnerFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, max: 30)
            try self.validate(self.regionFilter, name: "regionFilter", parent: name, min: 4)
        }

        private enum CodingKeys: String, CodingKey {
            case regionFilter = "regionFilter"
            case ruleOwnerFilter = "ruleOwnerFilter"
        }
    }

    public struct ListRuleTypesOutput: AWSDecodableShape {
        /// Lists the rules that are configured for the condition.
        public let ruleTypes: [RuleType]

        @inlinable
        public init(ruleTypes: [RuleType]) {
            self.ruleTypes = ruleTypes
        }

        private enum CodingKeys: String, CodingKey {
            case ruleTypes = "ruleTypes"
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource to get tags for.
        public let resourceArn: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case resourceArn = "resourceArn"
        }
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
        public let nextToken: String?
        /// The tags for the resource.
        public let tags: [Tag]?

        @inlinable
        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tags = "tags"
        }
    }

    public struct ListWebhookItem: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the webhook.
        public let arn: String?
        /// The detail returned for each webhook, such as the webhook authentication type and filter rules.
        public let definition: WebhookDefinition
        /// The number code of the error.
        public let errorCode: String?
        /// The text of the error message about the webhook.
        public let errorMessage: String?
        /// The date and time a webhook was last successfully triggered, in timestamp format.
        public let lastTriggered: Date?
        /// Specifies the tags applied to the webhook.
        public let tags: [Tag]?
        /// A unique URL generated by CodePipeline. When a POST request is made to this URL, the defined pipeline is started as long as the body of the post request satisfies the defined authentication and filtering conditions. Deleting and re-creating a webhook makes the old URL invalid and generates a new one.
        public let url: String

        @inlinable
        public init(arn: String? = nil, definition: WebhookDefinition, errorCode: String? = nil, errorMessage: String? = nil, lastTriggered: Date? = nil, tags: [Tag]? = nil, url: String) {
            self.arn = arn
            self.definition = definition
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.lastTriggered = lastTriggered
            self.tags = tags
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case definition = "definition"
            case errorCode = "errorCode"
            case errorMessage = "errorMessage"
            case lastTriggered = "lastTriggered"
            case tags = "tags"
            case url = "url"
        }
    }

    public struct ListWebhooksInput: AWSEncodableShape {
        /// The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token that was returned from the previous ListWebhooks call, which can be used to return the next set of webhooks in the list.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListWebhooksOutput: AWSDecodableShape {
        /// If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListWebhooks call to return the next set of webhooks in the list.
        public let nextToken: String?
        /// The JSON detail returned for each webhook in the list output for the ListWebhooks call.
        public let webhooks: [ListWebhookItem]?

        @inlinable
        public init(nextToken: String? = nil, webhooks: [ListWebhookItem]? = nil) {
            self.nextToken = nextToken
            self.webhooks = webhooks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case webhooks = "webhooks"
        }
    }

    public struct OutputArtifact: AWSEncodableShape & AWSDecodableShape {
        /// The files that you want to associate with the output artifact that will be exported from the compute action.
        public let files: [String]?
        /// The name of the output of an artifact, such as "My App". The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions. Output artifact names must be unique within a pipeline.
        public let name: String

        @inlinable
        public init(files: [String]? = nil, name: String) {
            self.files = files
            self.name = name
        }

        public func validate(name: String) throws {
            try self.files?.forEach {
                try validate($0, name: "files[]", parent: name, max: 128)
                try validate($0, name: "files[]", parent: name, min: 1)
            }
            try self.validate(self.files, name: "files", parent: name, max: 10)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9_\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case files = "files"
            case name = "name"
        }
    }

    public struct OverrideStageConditionInput: AWSEncodableShape {
        /// The type of condition to override for the stage, such as entry conditions, failure conditions, or success conditions.
        public let conditionType: ConditionType
        /// The ID of the pipeline execution for the override.
        public let pipelineExecutionId: String
        /// The name of the pipeline with the stage that will override the condition.
        public let pipelineName: String
        /// The name of the stage for the override.
        public let stageName: String

        @inlinable
        public init(conditionType: ConditionType, pipelineExecutionId: String, pipelineName: String, stageName: String) {
            self.conditionType = conditionType
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case conditionType = "conditionType"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
            case stageName = "stageName"
        }
    }

    public struct PipelineContext: AWSDecodableShape {
        /// The context of an action to a job worker in the stage of a pipeline.
        public let action: ActionContext?
        /// The Amazon Resource Name (ARN) of the pipeline.
        public let pipelineArn: String?
        /// The execution ID of the pipeline.
        public let pipelineExecutionId: String?
        /// The name of the pipeline. This is a user-specified value. Pipeline names must be unique across all pipeline names under an Amazon Web Services account.
        public let pipelineName: String?
        /// The stage of the pipeline.
        public let stage: StageContext?

        @inlinable
        public init(action: ActionContext? = nil, pipelineArn: String? = nil, pipelineExecutionId: String? = nil, pipelineName: String? = nil, stage: StageContext? = nil) {
            self.action = action
            self.pipelineArn = pipelineArn
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.stage = stage
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
            case pipelineArn = "pipelineArn"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
            case stage = "stage"
        }
    }

    public struct PipelineDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Represents information about the S3 bucket where artifacts are stored for the pipeline.  You must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.
        public let artifactStore: ArtifactStore?
        /// A mapping of artifactStore objects and their corresponding Amazon Web Services Regions. There must be an artifact store for the pipeline Region and for each cross-region action in the pipeline.  You must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.
        public let artifactStores: [String: ArtifactStore]?
        /// The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.
        public let executionMode: ExecutionMode?
        /// The name of the pipeline.
        public let name: String
        /// CodePipeline provides the following pipeline types, which differ in characteristics and price, so that you can tailor your pipeline features and cost to the needs of your applications.   V1 type pipelines have a JSON structure that contains standard pipeline, stage, and action-level parameters.   V2 type pipelines have the same structure as a V1 type, along with additional parameters for release safety and trigger configuration.    Including V2 parameters, such as triggers on Git tags, in the pipeline JSON when creating or updating a pipeline will result in the pipeline having the V2 type of pipeline and the associated costs.  For information about pricing for CodePipeline, see Pricing. For information about which type of pipeline to choose, see What type of pipeline is right for me?.
        public let pipelineType: PipelineType?
        /// The Amazon Resource Name (ARN) for CodePipeline to use to either perform actions with no actionRoleArn, or to use to assume roles for actions with an actionRoleArn.
        public let roleArn: String
        /// The stage in which to perform the action.
        public let stages: [StageDeclaration]
        /// The trigger configuration specifying a type of event, such as Git tags, that starts the pipeline.  When a trigger configuration is specified, default change detection for repository and branch commits is disabled.
        public let triggers: [PipelineTriggerDeclaration]?
        /// A list that defines the pipeline variables for a pipeline resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9@\-_]+.
        public let variables: [PipelineVariableDeclaration]?
        /// The version number of the pipeline. A new pipeline always has a version number of 1. This number is incremented when a pipeline is updated.
        public let version: Int?

        @inlinable
        public init(artifactStore: ArtifactStore? = nil, artifactStores: [String: ArtifactStore]? = nil, executionMode: ExecutionMode? = nil, name: String, pipelineType: PipelineType? = nil, roleArn: String, stages: [StageDeclaration], triggers: [PipelineTriggerDeclaration]? = nil, variables: [PipelineVariableDeclaration]? = nil, version: Int? = nil) {
            self.artifactStore = artifactStore
            self.artifactStores = artifactStores
            self.executionMode = executionMode
            self.name = name
            self.pipelineType = pipelineType
            self.roleArn = roleArn
            self.stages = stages
            self.triggers = triggers
            self.variables = variables
            self.version = version
        }

        public func validate(name: String) throws {
            try self.artifactStore?.validate(name: "\(name).artifactStore")
            try self.artifactStores?.forEach {
                try validate($0.key, name: "artifactStores.key", parent: name, max: 30)
                try validate($0.key, name: "artifactStores.key", parent: name, min: 4)
                try $0.value.validate(name: "\(name).artifactStores[\"\($0.key)\"]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1024)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/")
            try self.stages.forEach {
                try $0.validate(name: "\(name).stages[]")
            }
            try self.triggers?.forEach {
                try $0.validate(name: "\(name).triggers[]")
            }
            try self.validate(self.triggers, name: "triggers", parent: name, max: 50)
            try self.variables?.forEach {
                try $0.validate(name: "\(name).variables[]")
            }
            try self.validate(self.variables, name: "variables", parent: name, max: 50)
            try self.validate(self.version, name: "version", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case artifactStore = "artifactStore"
            case artifactStores = "artifactStores"
            case executionMode = "executionMode"
            case name = "name"
            case pipelineType = "pipelineType"
            case roleArn = "roleArn"
            case stages = "stages"
            case triggers = "triggers"
            case variables = "variables"
            case version = "version"
        }
    }

    public struct PipelineExecution: AWSDecodableShape {
        /// A list of ArtifactRevision objects included in a pipeline execution.
        public let artifactRevisions: [ArtifactRevision]?
        /// The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.
        public let executionMode: ExecutionMode?
        /// The type of the pipeline execution.
        public let executionType: ExecutionType?
        /// The ID of the pipeline execution.
        public let pipelineExecutionId: String?
        /// The name of the pipeline with the specified pipeline execution.
        public let pipelineName: String?
        /// The version number of the pipeline with the specified pipeline execution.
        public let pipelineVersion: Int?
        /// The metadata about the execution pertaining to stage rollback.
        public let rollbackMetadata: PipelineRollbackMetadata?
        /// The status of the pipeline execution.   Cancelled: The pipeline’s definition was updated before the pipeline execution could be completed.   InProgress: The pipeline execution is currently running.   Stopped: The pipeline execution was manually stopped. For more information, see Stopped Executions.   Stopping: The pipeline execution received a request to be manually stopped. Depending on the selected stop mode, the execution is either completing or abandoning in-progress actions. For more information, see Stopped Executions.   Succeeded: The pipeline execution was completed successfully.    Superseded: While this pipeline execution was waiting for the next stage to be completed, a newer pipeline execution advanced and continued through the pipeline instead. For more information, see Superseded Executions.   Failed: The pipeline execution was not completed successfully.
        public let status: PipelineExecutionStatus?
        /// A summary that contains a description of the pipeline execution status.
        public let statusSummary: String?
        public let trigger: ExecutionTrigger?
        /// A list of pipeline variables used for the pipeline execution.
        public let variables: [ResolvedPipelineVariable]?

        @inlinable
        public init(artifactRevisions: [ArtifactRevision]? = nil, executionMode: ExecutionMode? = nil, executionType: ExecutionType? = nil, pipelineExecutionId: String? = nil, pipelineName: String? = nil, pipelineVersion: Int? = nil, rollbackMetadata: PipelineRollbackMetadata? = nil, status: PipelineExecutionStatus? = nil, statusSummary: String? = nil, trigger: ExecutionTrigger? = nil, variables: [ResolvedPipelineVariable]? = nil) {
            self.artifactRevisions = artifactRevisions
            self.executionMode = executionMode
            self.executionType = executionType
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.pipelineVersion = pipelineVersion
            self.rollbackMetadata = rollbackMetadata
            self.status = status
            self.statusSummary = statusSummary
            self.trigger = trigger
            self.variables = variables
        }

        private enum CodingKeys: String, CodingKey {
            case artifactRevisions = "artifactRevisions"
            case executionMode = "executionMode"
            case executionType = "executionType"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
            case pipelineVersion = "pipelineVersion"
            case rollbackMetadata = "rollbackMetadata"
            case status = "status"
            case statusSummary = "statusSummary"
            case trigger = "trigger"
            case variables = "variables"
        }
    }

    public struct PipelineExecutionFilter: AWSEncodableShape {
        /// Filter for pipeline executions where the stage was successful in the current pipeline version.
        public let succeededInStage: SucceededInStageFilter?

        @inlinable
        public init(succeededInStage: SucceededInStageFilter? = nil) {
            self.succeededInStage = succeededInStage
        }

        public func validate(name: String) throws {
            try self.succeededInStage?.validate(name: "\(name).succeededInStage")
        }

        private enum CodingKeys: String, CodingKey {
            case succeededInStage = "succeededInStage"
        }
    }

    public struct PipelineExecutionSummary: AWSDecodableShape {
        /// The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.
        public let executionMode: ExecutionMode?
        /// Type of the pipeline execution.
        public let executionType: ExecutionType?
        /// The date and time of the last change to the pipeline execution, in timestamp format.
        public let lastUpdateTime: Date?
        /// The ID of the pipeline execution.
        public let pipelineExecutionId: String?
        /// The metadata for the stage execution to be rolled back.
        public let rollbackMetadata: PipelineRollbackMetadata?
        /// A list of the source artifact revisions that initiated a pipeline execution.
        public let sourceRevisions: [SourceRevision]?
        /// The date and time when the pipeline execution began, in timestamp format.
        public let startTime: Date?
        /// The status of the pipeline execution.   InProgress: The pipeline execution is currently running.   Stopped: The pipeline execution was manually stopped. For more information, see Stopped Executions.   Stopping: The pipeline execution received a request to be manually stopped. Depending on the selected stop mode, the execution is either completing or abandoning in-progress actions. For more information, see Stopped Executions.   Succeeded: The pipeline execution was completed successfully.    Superseded: While this pipeline execution was waiting for the next stage to be completed, a newer pipeline execution advanced and continued through the pipeline instead. For more information, see Superseded Executions.   Failed: The pipeline execution was not completed successfully.
        public let status: PipelineExecutionStatus?
        /// Status summary for the pipeline.
        public let statusSummary: String?
        /// The interaction that stopped a pipeline execution.
        public let stopTrigger: StopExecutionTrigger?
        /// The interaction or event that started a pipeline execution, such as automated change detection or a StartPipelineExecution API call.
        public let trigger: ExecutionTrigger?

        @inlinable
        public init(executionMode: ExecutionMode? = nil, executionType: ExecutionType? = nil, lastUpdateTime: Date? = nil, pipelineExecutionId: String? = nil, rollbackMetadata: PipelineRollbackMetadata? = nil, sourceRevisions: [SourceRevision]? = nil, startTime: Date? = nil, status: PipelineExecutionStatus? = nil, statusSummary: String? = nil, stopTrigger: StopExecutionTrigger? = nil, trigger: ExecutionTrigger? = nil) {
            self.executionMode = executionMode
            self.executionType = executionType
            self.lastUpdateTime = lastUpdateTime
            self.pipelineExecutionId = pipelineExecutionId
            self.rollbackMetadata = rollbackMetadata
            self.sourceRevisions = sourceRevisions
            self.startTime = startTime
            self.status = status
            self.statusSummary = statusSummary
            self.stopTrigger = stopTrigger
            self.trigger = trigger
        }

        private enum CodingKeys: String, CodingKey {
            case executionMode = "executionMode"
            case executionType = "executionType"
            case lastUpdateTime = "lastUpdateTime"
            case pipelineExecutionId = "pipelineExecutionId"
            case rollbackMetadata = "rollbackMetadata"
            case sourceRevisions = "sourceRevisions"
            case startTime = "startTime"
            case status = "status"
            case statusSummary = "statusSummary"
            case stopTrigger = "stopTrigger"
            case trigger = "trigger"
        }
    }

    public struct PipelineMetadata: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The Amazon Resource Name (ARN) of the pipeline.
        public let pipelineArn: String?
        /// The date and time that polling for source changes (periodic checks) was stopped for the pipeline, in timestamp format.   Pipelines that are inactive for longer than 30 days will have polling disabled for the pipeline. For more information, see pollingDisabledAt in the pipeline structure reference. For the steps to migrate your pipeline from polling to event-based change detection, see Migrate polling pipelines to use event-based change detection.  You can migrate (update) a polling pipeline to use event-based change detection. For example, for a pipeline with a CodeCommit source, we recommend you migrate (update) your pipeline to use CloudWatch Events. To learn more, see Migrate polling pipelines to use event-based change detection in the CodePipeline User Guide.
        public let pollingDisabledAt: Date?
        /// The date and time the pipeline was last updated, in timestamp format.
        public let updated: Date?

        @inlinable
        public init(created: Date? = nil, pipelineArn: String? = nil, pollingDisabledAt: Date? = nil, updated: Date? = nil) {
            self.created = created
            self.pipelineArn = pipelineArn
            self.pollingDisabledAt = pollingDisabledAt
            self.updated = updated
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case pipelineArn = "pipelineArn"
            case pollingDisabledAt = "pollingDisabledAt"
            case updated = "updated"
        }
    }

    public struct PipelineRollbackMetadata: AWSDecodableShape {
        /// The pipeline execution ID to which the stage will be rolled back.
        public let rollbackTargetPipelineExecutionId: String?

        @inlinable
        public init(rollbackTargetPipelineExecutionId: String? = nil) {
            self.rollbackTargetPipelineExecutionId = rollbackTargetPipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case rollbackTargetPipelineExecutionId = "rollbackTargetPipelineExecutionId"
        }
    }

    public struct PipelineSummary: AWSDecodableShape {
        /// The date and time the pipeline was created, in timestamp format.
        public let created: Date?
        /// The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.
        public let executionMode: ExecutionMode?
        /// The name of the pipeline.
        public let name: String?
        /// CodePipeline provides the following pipeline types, which differ in characteristics and price, so that you can tailor your pipeline features and cost to the needs of your applications.   V1 type pipelines have a JSON structure that contains standard pipeline, stage, and action-level parameters.   V2 type pipelines have the same structure as a V1 type, along with additional parameters for release safety and trigger configuration.    Including V2 parameters, such as triggers on Git tags, in the pipeline JSON when creating or updating a pipeline will result in the pipeline having the V2 type of pipeline and the associated costs.  For information about pricing for CodePipeline, see Pricing. For information about which type of pipeline to choose, see What type of pipeline is right for me?.
        public let pipelineType: PipelineType?
        /// The date and time of the last update to the pipeline, in timestamp format.
        public let updated: Date?
        /// The version number of the pipeline.
        public let version: Int?

        @inlinable
        public init(created: Date? = nil, executionMode: ExecutionMode? = nil, name: String? = nil, pipelineType: PipelineType? = nil, updated: Date? = nil, version: Int? = nil) {
            self.created = created
            self.executionMode = executionMode
            self.name = name
            self.pipelineType = pipelineType
            self.updated = updated
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case executionMode = "executionMode"
            case name = "name"
            case pipelineType = "pipelineType"
            case updated = "updated"
            case version = "version"
        }
    }

    public struct PipelineTriggerDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// Provides the filter criteria and the source stage for the repository event that starts the pipeline, such as Git tags.
        public let gitConfiguration: GitConfiguration
        /// The source provider for the event, such as connections configured for a repository with Git tags, for the specified trigger configuration.
        public let providerType: PipelineTriggerProviderType

        @inlinable
        public init(gitConfiguration: GitConfiguration, providerType: PipelineTriggerProviderType) {
            self.gitConfiguration = gitConfiguration
            self.providerType = providerType
        }

        public func validate(name: String) throws {
            try self.gitConfiguration.validate(name: "\(name).gitConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case gitConfiguration = "gitConfiguration"
            case providerType = "providerType"
        }
    }

    public struct PipelineVariable: AWSEncodableShape {
        /// The name of a pipeline-level variable.
        public let name: String
        /// The value of a pipeline-level variable.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9@\\-_]+$")
            try self.validate(self.value, name: "value", parent: name, max: 1000)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case value = "value"
        }
    }

    public struct PipelineVariableDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The value of a pipeline-level variable.
        public let defaultValue: String?
        /// The description of a pipeline-level variable. It's used to add additional context about the variable, and not being used at time when pipeline executes.
        public let description: String?
        /// The name of a pipeline-level variable.
        public let name: String

        @inlinable
        public init(defaultValue: String? = nil, description: String? = nil, name: String) {
            self.defaultValue = defaultValue
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, max: 1000)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, min: 1)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, pattern: ".*")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "defaultValue"
            case description = "description"
            case name = "name"
        }
    }

    public struct PollForJobsInput: AWSEncodableShape {
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId
        /// The maximum number of jobs to return in a poll for jobs call.
        public let maxBatchSize: Int?
        /// A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
        public let queryParam: [String: String]?

        @inlinable
        public init(actionTypeId: ActionTypeId, maxBatchSize: Int? = nil, queryParam: [String: String]? = nil) {
            self.actionTypeId = actionTypeId
            self.maxBatchSize = maxBatchSize
            self.queryParam = queryParam
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.validate(self.maxBatchSize, name: "maxBatchSize", parent: name, min: 1)
            try self.queryParam?.forEach {
                try validate($0.key, name: "queryParam.key", parent: name, max: 50)
                try validate($0.key, name: "queryParam.key", parent: name, min: 1)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, max: 50)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "queryParam[\"\($0.key)\"]", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            }
            try self.validate(self.queryParam, name: "queryParam", parent: name, max: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId = "actionTypeId"
            case maxBatchSize = "maxBatchSize"
            case queryParam = "queryParam"
        }
    }

    public struct PollForJobsOutput: AWSDecodableShape {
        /// Information about the jobs to take action on.
        public let jobs: [Job]?

        @inlinable
        public init(jobs: [Job]? = nil) {
            self.jobs = jobs
        }

        private enum CodingKeys: String, CodingKey {
            case jobs = "jobs"
        }
    }

    public struct PollForThirdPartyJobsInput: AWSEncodableShape {
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId
        /// The maximum number of jobs to return in a poll for jobs call.
        public let maxBatchSize: Int?

        @inlinable
        public init(actionTypeId: ActionTypeId, maxBatchSize: Int? = nil) {
            self.actionTypeId = actionTypeId
            self.maxBatchSize = maxBatchSize
        }

        public func validate(name: String) throws {
            try self.actionTypeId.validate(name: "\(name).actionTypeId")
            try self.validate(self.maxBatchSize, name: "maxBatchSize", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case actionTypeId = "actionTypeId"
            case maxBatchSize = "maxBatchSize"
        }
    }

    public struct PollForThirdPartyJobsOutput: AWSDecodableShape {
        /// Information about the jobs to take action on.
        public let jobs: [ThirdPartyJob]?

        @inlinable
        public init(jobs: [ThirdPartyJob]? = nil) {
            self.jobs = jobs
        }

        private enum CodingKeys: String, CodingKey {
            case jobs = "jobs"
        }
    }

    public struct PutActionRevisionInput: AWSEncodableShape {
        /// The name of the action that processes the revision.
        public let actionName: String
        /// Represents information about the version (or revision) of an action.
        public let actionRevision: ActionRevision
        /// The name of the pipeline that starts processing the revision to the source.
        public let pipelineName: String
        /// The name of the stage that contains the action that acts on the revision.
        public let stageName: String

        @inlinable
        public init(actionName: String, actionRevision: ActionRevision, pipelineName: String, stageName: String) {
            self.actionName = actionName
            self.actionRevision = actionRevision
            self.pipelineName = pipelineName
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 100)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.actionRevision.validate(name: "\(name).actionRevision")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case actionRevision = "actionRevision"
            case pipelineName = "pipelineName"
            case stageName = "stageName"
        }
    }

    public struct PutActionRevisionOutput: AWSDecodableShape {
        /// Indicates whether the artifact revision was previously used in an execution of the specified pipeline.
        public let newRevision: Bool?
        /// The ID of the current workflow state of the pipeline.
        public let pipelineExecutionId: String?

        @inlinable
        public init(newRevision: Bool? = nil, pipelineExecutionId: String? = nil) {
            self.newRevision = newRevision
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case newRevision = "newRevision"
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct PutApprovalResultInput: AWSEncodableShape {
        /// The name of the action for which approval is requested.
        public let actionName: String
        /// The name of the pipeline that contains the action.
        public let pipelineName: String
        /// Represents information about the result of the approval request.
        public let result: ApprovalResult
        /// The name of the stage that contains the action.
        public let stageName: String
        /// The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState action. It is used to validate that the approval request corresponding to this token is still valid.  For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the externalExecutionId in the response output from the ListActionExecutions action as the token in the approval request.
        public let token: String

        @inlinable
        public init(actionName: String, pipelineName: String, result: ApprovalResult, stageName: String, token: String) {
            self.actionName = actionName
            self.pipelineName = pipelineName
            self.result = result
            self.stageName = stageName
            self.token = token
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 100)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.result.validate(name: "\(name).result")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.token, name: "token", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case pipelineName = "pipelineName"
            case result = "result"
            case stageName = "stageName"
            case token = "token"
        }
    }

    public struct PutApprovalResultOutput: AWSDecodableShape {
        /// The timestamp showing when the approval or rejection was submitted.
        public let approvedAt: Date?

        @inlinable
        public init(approvedAt: Date? = nil) {
            self.approvedAt = approvedAt
        }

        private enum CodingKeys: String, CodingKey {
            case approvedAt = "approvedAt"
        }
    }

    public struct PutJobFailureResultInput: AWSEncodableShape {
        /// The details about the failure of a job.
        public let failureDetails: FailureDetails
        /// The unique system-generated ID of the job that failed. This is the same ID returned from PollForJobs.
        public let jobId: String

        @inlinable
        public init(failureDetails: FailureDetails, jobId: String) {
            self.failureDetails = failureDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.failureDetails.validate(name: "\(name).failureDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case failureDetails = "failureDetails"
            case jobId = "jobId"
        }
    }

    public struct PutJobSuccessResultInput: AWSEncodableShape {
        /// A token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.
        public let continuationToken: String?
        /// The ID of the current revision of the artifact successfully worked on by the job.
        public let currentRevision: CurrentRevision?
        /// The execution details of the successful job, such as the actions taken by the job worker.
        public let executionDetails: ExecutionDetails?
        /// The unique system-generated ID of the job that succeeded. This is the same ID returned from PollForJobs.
        public let jobId: String
        /// Key-value pairs produced as output by a job worker that can be made available to a downstream action configuration. outputVariables can be included only when there is no continuation token on the request.
        public let outputVariables: [String: String]?

        @inlinable
        public init(continuationToken: String? = nil, currentRevision: CurrentRevision? = nil, executionDetails: ExecutionDetails? = nil, jobId: String, outputVariables: [String: String]? = nil) {
            self.continuationToken = continuationToken
            self.currentRevision = currentRevision
            self.executionDetails = executionDetails
            self.jobId = jobId
            self.outputVariables = outputVariables
        }

        public func validate(name: String) throws {
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, max: 2048)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, min: 1)
            try self.currentRevision?.validate(name: "\(name).currentRevision")
            try self.executionDetails?.validate(name: "\(name).executionDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.outputVariables?.forEach {
                try validate($0.key, name: "outputVariables.key", parent: name, pattern: "^[A-Za-z0-9@\\-_]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case continuationToken = "continuationToken"
            case currentRevision = "currentRevision"
            case executionDetails = "executionDetails"
            case jobId = "jobId"
            case outputVariables = "outputVariables"
        }
    }

    public struct PutThirdPartyJobFailureResultInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// Represents information about failure details.
        public let failureDetails: FailureDetails
        /// The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs.
        public let jobId: String

        @inlinable
        public init(clientToken: String, failureDetails: FailureDetails, jobId: String) {
            self.clientToken = clientToken
            self.failureDetails = failureDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.failureDetails.validate(name: "\(name).failureDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case failureDetails = "failureDetails"
            case jobId = "jobId"
        }
    }

    public struct PutThirdPartyJobSuccessResultInput: AWSEncodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientToken: String
        /// A token generated by a job worker, such as a CodeDeploy deployment ID, that a successful job provides to identify a partner action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the partner action. When the action is complete, no continuation token should be supplied.
        public let continuationToken: String?
        /// Represents information about a current revision.
        public let currentRevision: CurrentRevision?
        /// The details of the actions taken and results produced on an artifact as it passes through stages in the pipeline.
        public let executionDetails: ExecutionDetails?
        /// The ID of the job that successfully completed. This is the same ID returned from PollForThirdPartyJobs.
        public let jobId: String

        @inlinable
        public init(clientToken: String, continuationToken: String? = nil, currentRevision: CurrentRevision? = nil, executionDetails: ExecutionDetails? = nil, jobId: String) {
            self.clientToken = clientToken
            self.continuationToken = continuationToken
            self.currentRevision = currentRevision
            self.executionDetails = executionDetails
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, max: 2048)
            try self.validate(self.continuationToken, name: "continuationToken", parent: name, min: 1)
            try self.currentRevision?.validate(name: "\(name).currentRevision")
            try self.executionDetails?.validate(name: "\(name).executionDetails")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 512)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case continuationToken = "continuationToken"
            case currentRevision = "currentRevision"
            case executionDetails = "executionDetails"
            case jobId = "jobId"
        }
    }

    public struct PutWebhookInput: AWSEncodableShape {
        /// The tags for the webhook.
        public let tags: [Tag]?
        /// The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it's used for later.
        public let webhook: WebhookDefinition

        @inlinable
        public init(tags: [Tag]? = nil, webhook: WebhookDefinition) {
            self.tags = tags
            self.webhook = webhook
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.webhook.validate(name: "\(name).webhook")
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
            case webhook = "webhook"
        }
    }

    public struct PutWebhookOutput: AWSDecodableShape {
        /// The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.
        public let webhook: ListWebhookItem?

        @inlinable
        public init(webhook: ListWebhookItem? = nil) {
            self.webhook = webhook
        }

        private enum CodingKeys: String, CodingKey {
            case webhook = "webhook"
        }
    }

    public struct RegisterWebhookWithThirdPartyInput: AWSEncodableShape {
        /// The name of an existing webhook created with PutWebhook to register with a supported third party.
        public let webhookName: String?

        @inlinable
        public init(webhookName: String? = nil) {
            self.webhookName = webhookName
        }

        public func validate(name: String) throws {
            try self.validate(self.webhookName, name: "webhookName", parent: name, max: 100)
            try self.validate(self.webhookName, name: "webhookName", parent: name, min: 1)
            try self.validate(self.webhookName, name: "webhookName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case webhookName = "webhookName"
        }
    }

    public struct RegisterWebhookWithThirdPartyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct ResolvedPipelineVariable: AWSDecodableShape {
        /// The name of a pipeline-level variable.
        public let name: String?
        /// The resolved value of a pipeline-level variable.
        public let resolvedValue: String?

        @inlinable
        public init(name: String? = nil, resolvedValue: String? = nil) {
            self.name = name
            self.resolvedValue = resolvedValue
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case resolvedValue = "resolvedValue"
        }
    }

    public struct RetryConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The method that you want to configure for automatic stage retry on stage failure. You can specify to retry only failed action in the stage or all actions in the stage.
        public let retryMode: StageRetryMode?

        @inlinable
        public init(retryMode: StageRetryMode? = nil) {
            self.retryMode = retryMode
        }

        private enum CodingKeys: String, CodingKey {
            case retryMode = "retryMode"
        }
    }

    public struct RetryStageExecutionInput: AWSEncodableShape {
        /// The ID of the pipeline execution in the failed stage to be retried. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the failed stage
        public let pipelineExecutionId: String
        /// The name of the pipeline that contains the failed stage.
        public let pipelineName: String
        /// The scope of the retry attempt.
        public let retryMode: StageRetryMode
        /// The name of the failed stage to be retried.
        public let stageName: String

        @inlinable
        public init(pipelineExecutionId: String, pipelineName: String, retryMode: StageRetryMode, stageName: String) {
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.retryMode = retryMode
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
            case retryMode = "retryMode"
            case stageName = "stageName"
        }
    }

    public struct RetryStageExecutionOutput: AWSDecodableShape {
        /// The ID of the current workflow execution in the failed stage.
        public let pipelineExecutionId: String?

        @inlinable
        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct RetryStageMetadata: AWSDecodableShape {
        /// The number of attempts for a specific stage with automatic retry on stage failure. One attempt is allowed for automatic stage retry on failure.
        public let autoStageRetryAttempt: Int?
        /// The latest trigger for a specific stage where manual or automatic retries have been made upon stage failure.
        public let latestRetryTrigger: RetryTrigger?
        /// The number of attempts for a specific stage where manual retries have been made upon stage failure.
        public let manualStageRetryAttempt: Int?

        @inlinable
        public init(autoStageRetryAttempt: Int? = nil, latestRetryTrigger: RetryTrigger? = nil, manualStageRetryAttempt: Int? = nil) {
            self.autoStageRetryAttempt = autoStageRetryAttempt
            self.latestRetryTrigger = latestRetryTrigger
            self.manualStageRetryAttempt = manualStageRetryAttempt
        }

        private enum CodingKeys: String, CodingKey {
            case autoStageRetryAttempt = "autoStageRetryAttempt"
            case latestRetryTrigger = "latestRetryTrigger"
            case manualStageRetryAttempt = "manualStageRetryAttempt"
        }
    }

    public struct RollbackStageInput: AWSEncodableShape {
        /// The name of the pipeline for which the stage will be rolled back.
        public let pipelineName: String
        /// The name of the stage in the pipeline to be rolled back.
        public let stageName: String
        /// The pipeline execution ID for the stage to be rolled back to.
        public let targetPipelineExecutionId: String

        @inlinable
        public init(pipelineName: String, stageName: String, targetPipelineExecutionId: String) {
            self.pipelineName = pipelineName
            self.stageName = stageName
            self.targetPipelineExecutionId = targetPipelineExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.targetPipelineExecutionId, name: "targetPipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineName = "pipelineName"
            case stageName = "stageName"
            case targetPipelineExecutionId = "targetPipelineExecutionId"
        }
    }

    public struct RollbackStageOutput: AWSDecodableShape {
        /// The execution ID of the pipeline execution for the stage that has been rolled back.
        public let pipelineExecutionId: String

        @inlinable
        public init(pipelineExecutionId: String) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct RuleConfigurationProperty: AWSDecodableShape {
        /// The description of the action configuration property that is displayed to users.
        public let description: String?
        /// Whether the configuration property is a key.
        public let key: Bool
        /// The name of the rule configuration property.
        public let name: String
        /// Indicates whether the property can be queried. If you create a pipeline with a condition and rule, and that rule contains a queryable property, the value for that configuration property is subject to other restrictions. The value must be less than or equal to twenty (20) characters. The value can contain only alphanumeric characters, underscores, and hyphens.
        public let queryable: Bool?
        /// Whether the configuration property is a required value.
        public let required: Bool
        /// Whether the configuration property is secret. When updating a pipeline, passing * * * * * without changing any other values of the action preserves the previous value of the secret.
        public let secret: Bool
        /// The type of the configuration property.
        public let type: RuleConfigurationPropertyType?

        @inlinable
        public init(description: String? = nil, key: Bool, name: String, queryable: Bool? = nil, required: Bool, secret: Bool, type: RuleConfigurationPropertyType? = nil) {
            self.description = description
            self.key = key
            self.name = name
            self.queryable = queryable
            self.required = required
            self.secret = secret
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case key = "key"
            case name = "name"
            case queryable = "queryable"
            case required = "required"
            case secret = "secret"
            case type = "type"
        }
    }

    public struct RuleDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The shell commands to run with your commands rule in CodePipeline. All commands are supported except multi-line formats. While CodeBuild logs and permissions are used, you do not need to create any resources in CodeBuild.  Using compute time for this action will incur separate charges in CodeBuild.
        public let commands: [String]?
        /// The action configuration fields for the rule.
        public let configuration: [String: String]?
        /// The input artifacts fields for the rule, such as specifying an input file for the rule.
        public let inputArtifacts: [InputArtifact]?
        /// The name of the rule that is created for the condition, such as VariableCheck.
        public let name: String
        /// The Region for the condition associated with the rule.
        public let region: String?
        /// The pipeline role ARN associated with the rule.
        public let roleArn: String?
        /// The ID for the rule type, which is made up of the combined values for category, owner, provider, and version.
        public let ruleTypeId: RuleTypeId
        /// The action timeout for the rule.
        public let timeoutInMinutes: Int?

        @inlinable
        public init(commands: [String]? = nil, configuration: [String: String]? = nil, inputArtifacts: [InputArtifact]? = nil, name: String, region: String? = nil, roleArn: String? = nil, ruleTypeId: RuleTypeId, timeoutInMinutes: Int? = nil) {
            self.commands = commands
            self.configuration = configuration
            self.inputArtifacts = inputArtifacts
            self.name = name
            self.region = region
            self.roleArn = roleArn
            self.ruleTypeId = ruleTypeId
            self.timeoutInMinutes = timeoutInMinutes
        }

        public func validate(name: String) throws {
            try self.commands?.forEach {
                try validate($0, name: "commands[]", parent: name, max: 1000)
                try validate($0, name: "commands[]", parent: name, min: 1)
            }
            try self.validate(self.commands, name: "commands", parent: name, max: 50)
            try self.validate(self.commands, name: "commands", parent: name, min: 1)
            try self.configuration?.forEach {
                try validate($0.key, name: "configuration.key", parent: name, max: 50)
                try validate($0.key, name: "configuration.key", parent: name, min: 1)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, max: 10000)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.configuration, name: "configuration", parent: name, max: 200)
            try self.inputArtifacts?.forEach {
                try $0.validate(name: "\(name).inputArtifacts[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.region, name: "region", parent: name, max: 30)
            try self.validate(self.region, name: "region", parent: name, min: 4)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1024)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/")
            try self.ruleTypeId.validate(name: "\(name).ruleTypeId")
            try self.validate(self.timeoutInMinutes, name: "timeoutInMinutes", parent: name, max: 86400)
            try self.validate(self.timeoutInMinutes, name: "timeoutInMinutes", parent: name, min: 5)
        }

        private enum CodingKeys: String, CodingKey {
            case commands = "commands"
            case configuration = "configuration"
            case inputArtifacts = "inputArtifacts"
            case name = "name"
            case region = "region"
            case roleArn = "roleArn"
            case ruleTypeId = "ruleTypeId"
            case timeoutInMinutes = "timeoutInMinutes"
        }
    }

    public struct RuleExecution: AWSDecodableShape {
        public let errorDetails: ErrorDetails?
        /// The external ID of the run of the rule.
        public let externalExecutionId: String?
        /// The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).
        public let externalExecutionUrl: String?
        /// The last status change of the rule.
        public let lastStatusChange: Date?
        /// The ARN of the user who last changed the rule.
        public let lastUpdatedBy: String?
        /// The execution ID for the run of the rule.
        public let ruleExecutionId: String?
        /// The status of the run of the rule, such as FAILED.
        public let status: RuleExecutionStatus?
        /// A summary of the run of the rule.
        public let summary: String?
        /// The system-generated token used to identify a unique request.
        public let token: String?

        @inlinable
        public init(errorDetails: ErrorDetails? = nil, externalExecutionId: String? = nil, externalExecutionUrl: String? = nil, lastStatusChange: Date? = nil, lastUpdatedBy: String? = nil, ruleExecutionId: String? = nil, status: RuleExecutionStatus? = nil, summary: String? = nil, token: String? = nil) {
            self.errorDetails = errorDetails
            self.externalExecutionId = externalExecutionId
            self.externalExecutionUrl = externalExecutionUrl
            self.lastStatusChange = lastStatusChange
            self.lastUpdatedBy = lastUpdatedBy
            self.ruleExecutionId = ruleExecutionId
            self.status = status
            self.summary = summary
            self.token = token
        }

        private enum CodingKeys: String, CodingKey {
            case errorDetails = "errorDetails"
            case externalExecutionId = "externalExecutionId"
            case externalExecutionUrl = "externalExecutionUrl"
            case lastStatusChange = "lastStatusChange"
            case lastUpdatedBy = "lastUpdatedBy"
            case ruleExecutionId = "ruleExecutionId"
            case status = "status"
            case summary = "summary"
            case token = "token"
        }
    }

    public struct RuleExecutionDetail: AWSDecodableShape {
        /// Input details for the rule execution, such as role ARN, Region, and input artifacts.
        public let input: RuleExecutionInput?
        /// The date and time of the last change to the rule execution, in timestamp format.
        public let lastUpdateTime: Date?
        /// Output details for the rule execution, such as the rule execution result.
        public let output: RuleExecutionOutput?
        /// The ID of the pipeline execution in the stage where the rule was run. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the stage.
        public let pipelineExecutionId: String?
        /// The version number of the pipeline with the stage where the rule was run.
        public let pipelineVersion: Int?
        /// The ID of the run for the rule.
        public let ruleExecutionId: String?
        /// The name of the rule that was run in the stage.
        public let ruleName: String?
        /// The name of the stage where the rule was run.
        public let stageName: String?
        /// The start time of the rule execution.
        public let startTime: Date?
        /// The status of the rule execution. Status categories are InProgress, Succeeded, and Failed.
        public let status: RuleExecutionStatus?
        /// The ARN of the user who changed the rule execution details.
        public let updatedBy: String?

        @inlinable
        public init(input: RuleExecutionInput? = nil, lastUpdateTime: Date? = nil, output: RuleExecutionOutput? = nil, pipelineExecutionId: String? = nil, pipelineVersion: Int? = nil, ruleExecutionId: String? = nil, ruleName: String? = nil, stageName: String? = nil, startTime: Date? = nil, status: RuleExecutionStatus? = nil, updatedBy: String? = nil) {
            self.input = input
            self.lastUpdateTime = lastUpdateTime
            self.output = output
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineVersion = pipelineVersion
            self.ruleExecutionId = ruleExecutionId
            self.ruleName = ruleName
            self.stageName = stageName
            self.startTime = startTime
            self.status = status
            self.updatedBy = updatedBy
        }

        private enum CodingKeys: String, CodingKey {
            case input = "input"
            case lastUpdateTime = "lastUpdateTime"
            case output = "output"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineVersion = "pipelineVersion"
            case ruleExecutionId = "ruleExecutionId"
            case ruleName = "ruleName"
            case stageName = "stageName"
            case startTime = "startTime"
            case status = "status"
            case updatedBy = "updatedBy"
        }
    }

    public struct RuleExecutionFilter: AWSEncodableShape {
        public let latestInPipelineExecution: LatestInPipelineExecutionFilter?
        /// The pipeline execution ID used to filter rule execution history.
        public let pipelineExecutionId: String?

        @inlinable
        public init(latestInPipelineExecution: LatestInPipelineExecutionFilter? = nil, pipelineExecutionId: String? = nil) {
            self.latestInPipelineExecution = latestInPipelineExecution
            self.pipelineExecutionId = pipelineExecutionId
        }

        public func validate(name: String) throws {
            try self.latestInPipelineExecution?.validate(name: "\(name).latestInPipelineExecution")
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case latestInPipelineExecution = "latestInPipelineExecution"
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct RuleExecutionInput: AWSDecodableShape {
        /// Configuration data for a rule execution, such as the resolved values for that run.
        public let configuration: [String: String]?
        /// Details of input artifacts of the rule that correspond to the rule execution.
        public let inputArtifacts: [ArtifactDetail]?
        /// The Amazon Web Services Region for the rule, such as us-east-1.
        public let region: String?
        /// Configuration data for a rule execution with all variable references replaced with their real values for the execution.
        public let resolvedConfiguration: [String: String]?
        /// The ARN of the IAM service role that performs the declared rule. This is assumed through the roleArn for the pipeline.
        public let roleArn: String?
        /// The ID for the rule type, which is made up of the combined values for category, owner, provider, and version. For more information about conditions, see Stage conditions. For more information about rules, see the CodePipeline rule reference.
        public let ruleTypeId: RuleTypeId?

        @inlinable
        public init(configuration: [String: String]? = nil, inputArtifacts: [ArtifactDetail]? = nil, region: String? = nil, resolvedConfiguration: [String: String]? = nil, roleArn: String? = nil, ruleTypeId: RuleTypeId? = nil) {
            self.configuration = configuration
            self.inputArtifacts = inputArtifacts
            self.region = region
            self.resolvedConfiguration = resolvedConfiguration
            self.roleArn = roleArn
            self.ruleTypeId = ruleTypeId
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "configuration"
            case inputArtifacts = "inputArtifacts"
            case region = "region"
            case resolvedConfiguration = "resolvedConfiguration"
            case roleArn = "roleArn"
            case ruleTypeId = "ruleTypeId"
        }
    }

    public struct RuleExecutionOutput: AWSDecodableShape {
        /// Execution result information listed in the output details for a rule execution.
        public let executionResult: RuleExecutionResult?

        @inlinable
        public init(executionResult: RuleExecutionResult? = nil) {
            self.executionResult = executionResult
        }

        private enum CodingKeys: String, CodingKey {
            case executionResult = "executionResult"
        }
    }

    public struct RuleExecutionResult: AWSDecodableShape {
        public let errorDetails: ErrorDetails?
        /// The external ID for the rule execution.
        public let externalExecutionId: String?
        /// The external provider summary for the rule execution.
        public let externalExecutionSummary: String?
        /// The deepest external link to the external resource (for example, a repository URL or deployment endpoint) that is used when running the rule.
        public let externalExecutionUrl: String?

        @inlinable
        public init(errorDetails: ErrorDetails? = nil, externalExecutionId: String? = nil, externalExecutionSummary: String? = nil, externalExecutionUrl: String? = nil) {
            self.errorDetails = errorDetails
            self.externalExecutionId = externalExecutionId
            self.externalExecutionSummary = externalExecutionSummary
            self.externalExecutionUrl = externalExecutionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case errorDetails = "errorDetails"
            case externalExecutionId = "externalExecutionId"
            case externalExecutionSummary = "externalExecutionSummary"
            case externalExecutionUrl = "externalExecutionUrl"
        }
    }

    public struct RuleRevision: AWSDecodableShape {
        /// The date and time when the most recent version of the rule was created, in timestamp format.
        public let created: Date
        /// The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).
        public let revisionChangeId: String
        /// The system-generated unique ID that identifies the revision number of the rule.
        public let revisionId: String

        @inlinable
        public init(created: Date, revisionChangeId: String, revisionId: String) {
            self.created = created
            self.revisionChangeId = revisionChangeId
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case created = "created"
            case revisionChangeId = "revisionChangeId"
            case revisionId = "revisionId"
        }
    }

    public struct RuleState: AWSDecodableShape {
        /// The ID of the current revision of the artifact successfully worked on by the job.
        public let currentRevision: RuleRevision?
        /// A URL link for more information about the state of the action, such as a details page.
        public let entityUrl: String?
        /// Represents information about the latest run of an rule.
        public let latestExecution: RuleExecution?
        /// A URL link for more information about the revision, such as a commit details page.
        public let revisionUrl: String?
        /// The name of the rule.
        public let ruleName: String?

        @inlinable
        public init(currentRevision: RuleRevision? = nil, entityUrl: String? = nil, latestExecution: RuleExecution? = nil, revisionUrl: String? = nil, ruleName: String? = nil) {
            self.currentRevision = currentRevision
            self.entityUrl = entityUrl
            self.latestExecution = latestExecution
            self.revisionUrl = revisionUrl
            self.ruleName = ruleName
        }

        private enum CodingKeys: String, CodingKey {
            case currentRevision = "currentRevision"
            case entityUrl = "entityUrl"
            case latestExecution = "latestExecution"
            case revisionUrl = "revisionUrl"
            case ruleName = "ruleName"
        }
    }

    public struct RuleType: AWSDecodableShape {
        /// Represents information about a rule type.
        public let id: RuleTypeId
        public let inputArtifactDetails: ArtifactDetails
        /// The configuration properties for the rule type.
        public let ruleConfigurationProperties: [RuleConfigurationProperty]?
        /// Returns information about the settings for a rule type.
        public let settings: RuleTypeSettings?

        @inlinable
        public init(id: RuleTypeId, inputArtifactDetails: ArtifactDetails, ruleConfigurationProperties: [RuleConfigurationProperty]? = nil, settings: RuleTypeSettings? = nil) {
            self.id = id
            self.inputArtifactDetails = inputArtifactDetails
            self.ruleConfigurationProperties = ruleConfigurationProperties
            self.settings = settings
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case inputArtifactDetails = "inputArtifactDetails"
            case ruleConfigurationProperties = "ruleConfigurationProperties"
            case settings = "settings"
        }
    }

    public struct RuleTypeId: AWSEncodableShape & AWSDecodableShape {
        /// A category defines what kind of rule can be run in the stage, and constrains the provider type for the rule. The valid category is Rule.
        public let category: RuleCategory
        /// The creator of the rule being called. The valid value for the Owner field in the rule category is AWS.
        public let owner: RuleOwner?
        /// The rule provider, such as the DeploymentWindow rule. For a list of rule provider names, see the rules listed in the CodePipeline rule reference.
        public let provider: String
        /// A string that describes the rule version.
        public let version: String?

        @inlinable
        public init(category: RuleCategory, owner: RuleOwner? = nil, provider: String, version: String? = nil) {
            self.category = category
            self.owner = owner
            self.provider = provider
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.provider, name: "provider", parent: name, max: 35)
            try self.validate(self.provider, name: "provider", parent: name, min: 1)
            try self.validate(self.provider, name: "provider", parent: name, pattern: "^[0-9A-Za-z_-]+$")
            try self.validate(self.version, name: "version", parent: name, max: 9)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case category = "category"
            case owner = "owner"
            case provider = "provider"
            case version = "version"
        }
    }

    public struct RuleTypeSettings: AWSDecodableShape {
        /// The URL returned to the CodePipeline console that provides a deep link to the resources of the external system, such as the configuration page for a CodeDeploy deployment group. This link is provided as part of the action display in the pipeline.
        public let entityUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the top-level landing page for the external system, such as the console page for CodeDeploy. This link is shown on the pipeline view page in the CodePipeline console and provides a link to the execution entity of the external action.
        public let executionUrlTemplate: String?
        /// The URL returned to the CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.
        public let revisionUrlTemplate: String?
        /// The URL of a sign-up page where users can sign up for an external service and perform initial configuration of the action provided by that service.
        public let thirdPartyConfigurationUrl: String?

        @inlinable
        public init(entityUrlTemplate: String? = nil, executionUrlTemplate: String? = nil, revisionUrlTemplate: String? = nil, thirdPartyConfigurationUrl: String? = nil) {
            self.entityUrlTemplate = entityUrlTemplate
            self.executionUrlTemplate = executionUrlTemplate
            self.revisionUrlTemplate = revisionUrlTemplate
            self.thirdPartyConfigurationUrl = thirdPartyConfigurationUrl
        }

        private enum CodingKeys: String, CodingKey {
            case entityUrlTemplate = "entityUrlTemplate"
            case executionUrlTemplate = "executionUrlTemplate"
            case revisionUrlTemplate = "revisionUrlTemplate"
            case thirdPartyConfigurationUrl = "thirdPartyConfigurationUrl"
        }
    }

    public struct S3ArtifactLocation: AWSDecodableShape {
        /// The name of the S3 bucket.
        public let bucketName: String
        /// The key of the object in the S3 bucket, which uniquely identifies the object in the bucket.
        public let objectKey: String

        @inlinable
        public init(bucketName: String, objectKey: String) {
            self.bucketName = bucketName
            self.objectKey = objectKey
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName = "bucketName"
            case objectKey = "objectKey"
        }
    }

    public struct S3Location: AWSDecodableShape {
        /// The Amazon S3 artifact bucket for an action's artifacts.
        public let bucket: String?
        /// The artifact name.
        public let key: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case key = "key"
        }
    }

    public struct SourceRevision: AWSDecodableShape {
        /// The name of the action that processed the revision to the source artifact.
        public let actionName: String
        /// The system-generated unique ID that identifies the revision number of the artifact.
        public let revisionId: String?
        /// Summary information about the most recent revision of the artifact. For GitHub and CodeCommit repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a codepipeline-artifact-revision-summary key specified in the object metadata.
        public let revisionSummary: String?
        /// The commit ID for the artifact revision. For artifacts stored in GitHub or CodeCommit repositories, the commit ID is linked to a commit details page.
        public let revisionUrl: String?

        @inlinable
        public init(actionName: String, revisionId: String? = nil, revisionSummary: String? = nil, revisionUrl: String? = nil) {
            self.actionName = actionName
            self.revisionId = revisionId
            self.revisionSummary = revisionSummary
            self.revisionUrl = revisionUrl
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case revisionId = "revisionId"
            case revisionSummary = "revisionSummary"
            case revisionUrl = "revisionUrl"
        }
    }

    public struct SourceRevisionOverride: AWSEncodableShape {
        /// The name of the action where the override will be applied.
        public let actionName: String
        /// The type of source revision, based on the source provider. For example, the revision type for the CodeCommit action provider is the commit ID.
        public let revisionType: SourceRevisionType
        /// The source revision, or version of your source artifact, with the changes that you want to run in the pipeline execution.
        public let revisionValue: String

        @inlinable
        public init(actionName: String, revisionType: SourceRevisionType, revisionValue: String) {
            self.actionName = actionName
            self.revisionType = revisionType
            self.revisionValue = revisionValue
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 100)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.revisionValue, name: "revisionValue", parent: name, max: 1500)
            try self.validate(self.revisionValue, name: "revisionValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case revisionType = "revisionType"
            case revisionValue = "revisionValue"
        }
    }

    public struct StageConditionState: AWSDecodableShape {
        /// The states of the conditions for a run of a condition for a stage.
        public let conditionStates: [ConditionState]?
        /// Represents information about the latest run of a condition for a stage.
        public let latestExecution: StageConditionsExecution?

        @inlinable
        public init(conditionStates: [ConditionState]? = nil, latestExecution: StageConditionsExecution? = nil) {
            self.conditionStates = conditionStates
            self.latestExecution = latestExecution
        }

        private enum CodingKeys: String, CodingKey {
            case conditionStates = "conditionStates"
            case latestExecution = "latestExecution"
        }
    }

    public struct StageConditionsExecution: AWSDecodableShape {
        /// The status of a run of a condition for a stage.
        public let status: ConditionExecutionStatus?
        /// A summary of the run of the condition for a stage.
        public let summary: String?

        @inlinable
        public init(status: ConditionExecutionStatus? = nil, summary: String? = nil) {
            self.status = status
            self.summary = summary
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
            case summary = "summary"
        }
    }

    public struct StageContext: AWSDecodableShape {
        /// The name of the stage.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct StageDeclaration: AWSEncodableShape & AWSDecodableShape {
        /// The actions included in a stage.
        public let actions: [ActionDeclaration]
        /// The method to use when a stage allows entry. For example, configuring this field for conditions will allow entry to the stage when the conditions are met.
        public let beforeEntry: BeforeEntryConditions?
        /// Reserved for future use.
        public let blockers: [BlockerDeclaration]?
        /// The name of the stage.
        public let name: String
        /// The method to use when a stage has not completed successfully. For example, configuring this field for rollback will roll back a failed stage automatically to the last successful pipeline execution in the stage.
        public let onFailure: FailureConditions?
        /// The method to use when a stage has succeeded. For example, configuring this field for conditions will allow the stage to succeed when the conditions are met.
        public let onSuccess: SuccessConditions?

        @inlinable
        public init(actions: [ActionDeclaration], beforeEntry: BeforeEntryConditions? = nil, blockers: [BlockerDeclaration]? = nil, name: String, onFailure: FailureConditions? = nil, onSuccess: SuccessConditions? = nil) {
            self.actions = actions
            self.beforeEntry = beforeEntry
            self.blockers = blockers
            self.name = name
            self.onFailure = onFailure
            self.onSuccess = onSuccess
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try $0.validate(name: "\(name).actions[]")
            }
            try self.beforeEntry?.validate(name: "\(name).beforeEntry")
            try self.blockers?.forEach {
                try $0.validate(name: "\(name).blockers[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.onFailure?.validate(name: "\(name).onFailure")
            try self.onSuccess?.validate(name: "\(name).onSuccess")
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "actions"
            case beforeEntry = "beforeEntry"
            case blockers = "blockers"
            case name = "name"
            case onFailure = "onFailure"
            case onSuccess = "onSuccess"
        }
    }

    public struct StageExecution: AWSDecodableShape {
        /// The ID of the pipeline execution associated with the stage.
        public let pipelineExecutionId: String
        /// The status of the stage, or for a completed stage, the last status of the stage.  A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.
        public let status: StageExecutionStatus
        /// The type of pipeline execution for the stage, such as a rollback pipeline execution.
        public let type: ExecutionType?

        @inlinable
        public init(pipelineExecutionId: String, status: StageExecutionStatus, type: ExecutionType? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
            self.status = status
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
            case status = "status"
            case type = "type"
        }
    }

    public struct StageState: AWSDecodableShape {
        /// The state of the stage.
        public let actionStates: [ActionState]?
        /// The state of the entry conditions for a stage.
        public let beforeEntryConditionState: StageConditionState?
        public let inboundExecution: StageExecution?
        /// The inbound executions for a stage.
        public let inboundExecutions: [StageExecution]?
        /// The state of the inbound transition, which is either enabled or disabled.
        public let inboundTransitionState: TransitionState?
        /// Information about the latest execution in the stage, including its ID and status.
        public let latestExecution: StageExecution?
        /// The state of the failure conditions for a stage.
        public let onFailureConditionState: StageConditionState?
        /// The state of the success conditions for a stage.
        public let onSuccessConditionState: StageConditionState?
        /// he details of a specific automatic retry on stage failure, including the attempt number and trigger.
        public let retryStageMetadata: RetryStageMetadata?
        /// The name of the stage.
        public let stageName: String?

        @inlinable
        public init(actionStates: [ActionState]? = nil, beforeEntryConditionState: StageConditionState? = nil, inboundExecution: StageExecution? = nil, inboundExecutions: [StageExecution]? = nil, inboundTransitionState: TransitionState? = nil, latestExecution: StageExecution? = nil, onFailureConditionState: StageConditionState? = nil, onSuccessConditionState: StageConditionState? = nil, retryStageMetadata: RetryStageMetadata? = nil, stageName: String? = nil) {
            self.actionStates = actionStates
            self.beforeEntryConditionState = beforeEntryConditionState
            self.inboundExecution = inboundExecution
            self.inboundExecutions = inboundExecutions
            self.inboundTransitionState = inboundTransitionState
            self.latestExecution = latestExecution
            self.onFailureConditionState = onFailureConditionState
            self.onSuccessConditionState = onSuccessConditionState
            self.retryStageMetadata = retryStageMetadata
            self.stageName = stageName
        }

        private enum CodingKeys: String, CodingKey {
            case actionStates = "actionStates"
            case beforeEntryConditionState = "beforeEntryConditionState"
            case inboundExecution = "inboundExecution"
            case inboundExecutions = "inboundExecutions"
            case inboundTransitionState = "inboundTransitionState"
            case latestExecution = "latestExecution"
            case onFailureConditionState = "onFailureConditionState"
            case onSuccessConditionState = "onSuccessConditionState"
            case retryStageMetadata = "retryStageMetadata"
            case stageName = "stageName"
        }
    }

    public struct StartPipelineExecutionInput: AWSEncodableShape {
        /// The system-generated unique ID used to identify a unique execution request.
        public let clientRequestToken: String?
        /// The name of the pipeline to start.
        public let name: String
        /// A list that allows you to specify, or override, the source revision for a pipeline execution that's being started. A source revision is the version with all the changes to your application code, or source artifact, for the pipeline execution.
        public let sourceRevisions: [SourceRevisionOverride]?
        /// A list that overrides pipeline variables for a pipeline execution that's being started. Variable names must match [A-Za-z0-9@\-_]+, and the values can be anything except an empty string.
        public let variables: [PipelineVariable]?

        @inlinable
        public init(clientRequestToken: String? = StartPipelineExecutionInput.idempotencyToken(), name: String, sourceRevisions: [SourceRevisionOverride]? = nil, variables: [PipelineVariable]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.sourceRevisions = sourceRevisions
            self.variables = variables
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 128)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.sourceRevisions?.forEach {
                try $0.validate(name: "\(name).sourceRevisions[]")
            }
            try self.validate(self.sourceRevisions, name: "sourceRevisions", parent: name, max: 50)
            try self.variables?.forEach {
                try $0.validate(name: "\(name).variables[]")
            }
            try self.validate(self.variables, name: "variables", parent: name, max: 50)
            try self.validate(self.variables, name: "variables", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "clientRequestToken"
            case name = "name"
            case sourceRevisions = "sourceRevisions"
            case variables = "variables"
        }
    }

    public struct StartPipelineExecutionOutput: AWSDecodableShape {
        /// The unique system-generated ID of the pipeline execution that was started.
        public let pipelineExecutionId: String?

        @inlinable
        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct StopExecutionTrigger: AWSDecodableShape {
        /// The user-specified reason the pipeline was stopped.
        public let reason: String?

        @inlinable
        public init(reason: String? = nil) {
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case reason = "reason"
        }
    }

    public struct StopPipelineExecutionInput: AWSEncodableShape {
        /// Use this option to stop the pipeline execution by abandoning, rather than finishing, in-progress actions.  This option can lead to failed or out-of-sequence tasks.
        public let abandon: Bool?
        /// The ID of the pipeline execution to be stopped in the current stage. Use the GetPipelineState action to retrieve the current pipelineExecutionId.
        public let pipelineExecutionId: String
        /// The name of the pipeline to stop.
        public let pipelineName: String
        /// Use this option to enter comments, such as the reason the pipeline was stopped.
        public let reason: String?

        @inlinable
        public init(abandon: Bool? = nil, pipelineExecutionId: String, pipelineName: String, reason: String? = nil) {
            self.abandon = abandon
            self.pipelineExecutionId = pipelineExecutionId
            self.pipelineName = pipelineName
            self.reason = reason
        }

        public func validate(name: String) throws {
            try self.validate(self.pipelineExecutionId, name: "pipelineExecutionId", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, max: 100)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, min: 1)
            try self.validate(self.pipelineName, name: "pipelineName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.reason, name: "reason", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case abandon = "abandon"
            case pipelineExecutionId = "pipelineExecutionId"
            case pipelineName = "pipelineName"
            case reason = "reason"
        }
    }

    public struct StopPipelineExecutionOutput: AWSDecodableShape {
        /// The unique system-generated ID of the pipeline execution that was stopped.
        public let pipelineExecutionId: String?

        @inlinable
        public init(pipelineExecutionId: String? = nil) {
            self.pipelineExecutionId = pipelineExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineExecutionId = "pipelineExecutionId"
        }
    }

    public struct SucceededInStageFilter: AWSEncodableShape {
        /// The name of the stage for filtering for pipeline executions where the stage was successful in the current pipeline version.
        public let stageName: String?

        @inlinable
        public init(stageName: String? = nil) {
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.stageName, name: "stageName", parent: name, max: 100)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case stageName = "stageName"
        }
    }

    public struct SuccessConditions: AWSEncodableShape & AWSDecodableShape {
        /// The conditions that are success conditions.
        public let conditions: [Condition]

        @inlinable
        public init(conditions: [Condition]) {
            self.conditions = conditions
        }

        public func validate(name: String) throws {
            try self.conditions.forEach {
                try $0.validate(name: "\(name).conditions[]")
            }
            try self.validate(self.conditions, name: "conditions", parent: name, max: 1)
            try self.validate(self.conditions, name: "conditions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case conditions = "conditions"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String
        /// The tag's value.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource you want to add tags to.
        public let resourceArn: String
        /// The tags you want to modify or add to the resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct TargetFilter: AWSEncodableShape {
        /// The name on which to filter.
        public let name: TargetFilterName?
        /// The values on which to filter.
        public let values: [String]?

        @inlinable
        public init(name: TargetFilterName? = nil, values: [String]? = nil) {
            self.name = name
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values?.forEach {
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case values = "values"
        }
    }

    public struct ThirdPartyJob: AWSDecodableShape {
        /// The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.
        public let clientId: String?
        /// The identifier used to identify the job in CodePipeline.
        public let jobId: String?

        @inlinable
        public init(clientId: String? = nil, jobId: String? = nil) {
            self.clientId = clientId
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "clientId"
            case jobId = "jobId"
        }
    }

    public struct ThirdPartyJobData: AWSDecodableShape {
        /// Represents information about an action configuration.
        public let actionConfiguration: ActionConfiguration?
        /// Represents information about an action type.
        public let actionTypeId: ActionTypeId?
        /// Represents an Amazon Web Services session credentials object. These credentials are temporary credentials that are issued by Amazon Web Services Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store artifact for the pipeline in CodePipeline.
        public let artifactCredentials: AWSSessionCredentials?
        /// A system-generated token, such as a CodeDeploy deployment ID, that a job requires to continue the job asynchronously.
        public let continuationToken: String?
        /// The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an Amazon Web Services Key Management Service (Amazon Web Services KMS) key. This is optional and might not be present.
        public let encryptionKey: EncryptionKey?
        /// The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the name of an output artifact generated by an action in an earlier action or stage of the pipeline.
        public let inputArtifacts: [Artifact]?
        /// The name of the artifact that is the result of the action, if any. This name might be system-generated, such as "MyBuiltApp", or it might be defined by the user when the action is created.
        public let outputArtifacts: [Artifact]?
        /// Represents information about a pipeline to a job worker.  Does not include pipelineArn and pipelineExecutionId for ThirdParty jobs.
        public let pipelineContext: PipelineContext?

        @inlinable
        public init(actionConfiguration: ActionConfiguration? = nil, actionTypeId: ActionTypeId? = nil, artifactCredentials: AWSSessionCredentials? = nil, continuationToken: String? = nil, encryptionKey: EncryptionKey? = nil, inputArtifacts: [Artifact]? = nil, outputArtifacts: [Artifact]? = nil, pipelineContext: PipelineContext? = nil) {
            self.actionConfiguration = actionConfiguration
            self.actionTypeId = actionTypeId
            self.artifactCredentials = artifactCredentials
            self.continuationToken = continuationToken
            self.encryptionKey = encryptionKey
            self.inputArtifacts = inputArtifacts
            self.outputArtifacts = outputArtifacts
            self.pipelineContext = pipelineContext
        }

        private enum CodingKeys: String, CodingKey {
            case actionConfiguration = "actionConfiguration"
            case actionTypeId = "actionTypeId"
            case artifactCredentials = "artifactCredentials"
            case continuationToken = "continuationToken"
            case encryptionKey = "encryptionKey"
            case inputArtifacts = "inputArtifacts"
            case outputArtifacts = "outputArtifacts"
            case pipelineContext = "pipelineContext"
        }
    }

    public struct ThirdPartyJobDetails: AWSDecodableShape {
        /// The data to be returned by the third party job worker.
        public let data: ThirdPartyJobData?
        /// The identifier used to identify the job details in CodePipeline.
        public let id: String?
        /// A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an AcknowledgeThirdPartyJob request.
        public let nonce: String?

        @inlinable
        public init(data: ThirdPartyJobData? = nil, id: String? = nil, nonce: String? = nil) {
            self.data = data
            self.id = id
            self.nonce = nonce
        }

        private enum CodingKeys: String, CodingKey {
            case data = "data"
            case id = "id"
            case nonce = "nonce"
        }
    }

    public struct TransitionState: AWSDecodableShape {
        /// The user-specified reason why the transition between two stages of a pipeline was disabled.
        public let disabledReason: String?
        /// Whether the transition between stages is enabled (true) or disabled (false).
        public let enabled: Bool?
        /// The timestamp when the transition state was last changed.
        public let lastChangedAt: Date?
        /// The ID of the user who last changed the transition state.
        public let lastChangedBy: String?

        @inlinable
        public init(disabledReason: String? = nil, enabled: Bool? = nil, lastChangedAt: Date? = nil, lastChangedBy: String? = nil) {
            self.disabledReason = disabledReason
            self.enabled = enabled
            self.lastChangedAt = lastChangedAt
            self.lastChangedBy = lastChangedBy
        }

        private enum CodingKeys: String, CodingKey {
            case disabledReason = "disabledReason"
            case enabled = "enabled"
            case lastChangedAt = "lastChangedAt"
            case lastChangedBy = "lastChangedBy"
        }
    }

    public struct UntagResourceInput: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the resource to remove tags from.
        public let resourceArn: String
        /// The list of keys for the tags to be removed from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[\\w]+)*:codepipeline:.+:[0-9]{12}:.+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tagKeys = "tagKeys"
        }
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateActionTypeInput: AWSEncodableShape {
        /// The action type definition for the action type to be updated.
        public let actionType: ActionTypeDeclaration

        @inlinable
        public init(actionType: ActionTypeDeclaration) {
            self.actionType = actionType
        }

        public func validate(name: String) throws {
            try self.actionType.validate(name: "\(name).actionType")
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "actionType"
        }
    }

    public struct UpdatePipelineInput: AWSEncodableShape {
        /// The name of the pipeline to be updated.
        public let pipeline: PipelineDeclaration

        @inlinable
        public init(pipeline: PipelineDeclaration) {
            self.pipeline = pipeline
        }

        public func validate(name: String) throws {
            try self.pipeline.validate(name: "\(name).pipeline")
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline = "pipeline"
        }
    }

    public struct UpdatePipelineOutput: AWSDecodableShape {
        /// The structure of the updated pipeline.
        public let pipeline: PipelineDeclaration?

        @inlinable
        public init(pipeline: PipelineDeclaration? = nil) {
            self.pipeline = pipeline
        }

        private enum CodingKeys: String, CodingKey {
            case pipeline = "pipeline"
        }
    }

    public struct WebhookAuthConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The property used to configure acceptance of webhooks in an IP address range. For IP, only the AllowedIPRange property must be set. This property must be set to a valid CIDR range.
        public let allowedIPRange: String?
        /// The property used to configure GitHub authentication. For GITHUB_HMAC, only the SecretToken property must be set.  When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.   If a secret token was provided, it will be redacted in the response.
        public let secretToken: String?

        @inlinable
        public init(allowedIPRange: String? = nil, secretToken: String? = nil) {
            self.allowedIPRange = allowedIPRange
            self.secretToken = secretToken
        }

        public func validate(name: String) throws {
            try self.validate(self.allowedIPRange, name: "allowedIPRange", parent: name, max: 100)
            try self.validate(self.allowedIPRange, name: "allowedIPRange", parent: name, min: 1)
            try self.validate(self.secretToken, name: "secretToken", parent: name, max: 100)
            try self.validate(self.secretToken, name: "secretToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowedIPRange = "AllowedIPRange"
            case secretToken = "SecretToken"
        }
    }

    public struct WebhookDefinition: AWSEncodableShape & AWSDecodableShape {
        /// Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.  When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities.   If a secret token was provided, it will be redacted in the response.    For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website.   IP rejects webhooks trigger requests unless they originate from an IP address in the IP range whitelisted in the authentication configuration.   UNAUTHENTICATED accepts all webhook trigger requests regardless of origin.
        public let authentication: WebhookAuthenticationType
        /// Properties that configure the authentication applied to incoming webhook trigger requests. The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken property must be set. For IP, only the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.
        public let authenticationConfiguration: WebhookAuthConfiguration
        /// A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.
        public let filters: [WebhookFilterRule]
        /// The name of the webhook.
        public let name: String
        /// The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.
        public let targetAction: String
        /// The name of the pipeline you want to connect to the webhook.
        public let targetPipeline: String

        @inlinable
        public init(authentication: WebhookAuthenticationType, authenticationConfiguration: WebhookAuthConfiguration, filters: [WebhookFilterRule], name: String, targetAction: String, targetPipeline: String) {
            self.authentication = authentication
            self.authenticationConfiguration = authenticationConfiguration
            self.filters = filters
            self.name = name
            self.targetAction = targetAction
            self.targetPipeline = targetPipeline
        }

        public func validate(name: String) throws {
            try self.authenticationConfiguration.validate(name: "\(name).authenticationConfiguration")
            try self.filters.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 5)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.targetAction, name: "targetAction", parent: name, max: 100)
            try self.validate(self.targetAction, name: "targetAction", parent: name, min: 1)
            try self.validate(self.targetAction, name: "targetAction", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, max: 100)
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, min: 1)
            try self.validate(self.targetPipeline, name: "targetPipeline", parent: name, pattern: "^[A-Za-z0-9.@\\-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case authentication = "authentication"
            case authenticationConfiguration = "authenticationConfiguration"
            case filters = "filters"
            case name = "name"
            case targetAction = "targetAction"
            case targetPipeline = "targetPipeline"
        }
    }

    public struct WebhookFilterRule: AWSEncodableShape & AWSDecodableShape {
        /// A JsonPath expression that is applied to the body/payload of the webhook. The value selected by the JsonPath expression must match the value specified in the MatchEquals field. Otherwise, the request is ignored. For more information, see Java JsonPath implementation in GitHub.
        public let jsonPath: String
        /// The value selected by the JsonPath expression must match what is supplied in the MatchEquals field. Otherwise, the request is ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly brackets. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "main", the MatchEquals value is evaluated as "refs/heads/main". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements.
        public let matchEquals: String?

        @inlinable
        public init(jsonPath: String, matchEquals: String? = nil) {
            self.jsonPath = jsonPath
            self.matchEquals = matchEquals
        }

        public func validate(name: String) throws {
            try self.validate(self.jsonPath, name: "jsonPath", parent: name, max: 150)
            try self.validate(self.jsonPath, name: "jsonPath", parent: name, min: 1)
            try self.validate(self.matchEquals, name: "matchEquals", parent: name, max: 150)
            try self.validate(self.matchEquals, name: "matchEquals", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case jsonPath = "jsonPath"
            case matchEquals = "matchEquals"
        }
    }
}

// MARK: - Errors

/// Error enum for CodePipeline
public struct CodePipelineErrorType: AWSErrorType {
    enum Code: String {
        case actionExecutionNotFoundException = "ActionExecutionNotFoundException"
        case actionNotFoundException = "ActionNotFoundException"
        case actionTypeNotFoundException = "ActionTypeNotFoundException"
        case approvalAlreadyCompletedException = "ApprovalAlreadyCompletedException"
        case concurrentModificationException = "ConcurrentModificationException"
        case concurrentPipelineExecutionsLimitExceededException = "ConcurrentPipelineExecutionsLimitExceededException"
        case conditionNotOverridableException = "ConditionNotOverridableException"
        case conflictException = "ConflictException"
        case duplicatedStopRequestException = "DuplicatedStopRequestException"
        case invalidActionDeclarationException = "InvalidActionDeclarationException"
        case invalidApprovalTokenException = "InvalidApprovalTokenException"
        case invalidArnException = "InvalidArnException"
        case invalidBlockerDeclarationException = "InvalidBlockerDeclarationException"
        case invalidClientTokenException = "InvalidClientTokenException"
        case invalidJobException = "InvalidJobException"
        case invalidJobStateException = "InvalidJobStateException"
        case invalidNextTokenException = "InvalidNextTokenException"
        case invalidNonceException = "InvalidNonceException"
        case invalidStageDeclarationException = "InvalidStageDeclarationException"
        case invalidStructureException = "InvalidStructureException"
        case invalidTagsException = "InvalidTagsException"
        case invalidWebhookAuthenticationParametersException = "InvalidWebhookAuthenticationParametersException"
        case invalidWebhookFilterPatternException = "InvalidWebhookFilterPatternException"
        case jobNotFoundException = "JobNotFoundException"
        case limitExceededException = "LimitExceededException"
        case notLatestPipelineExecutionException = "NotLatestPipelineExecutionException"
        case outputVariablesSizeExceededException = "OutputVariablesSizeExceededException"
        case pipelineExecutionNotFoundException = "PipelineExecutionNotFoundException"
        case pipelineExecutionNotStoppableException = "PipelineExecutionNotStoppableException"
        case pipelineExecutionOutdatedException = "PipelineExecutionOutdatedException"
        case pipelineNameInUseException = "PipelineNameInUseException"
        case pipelineNotFoundException = "PipelineNotFoundException"
        case pipelineVersionNotFoundException = "PipelineVersionNotFoundException"
        case requestFailedException = "RequestFailedException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case stageNotFoundException = "StageNotFoundException"
        case stageNotRetryableException = "StageNotRetryableException"
        case tooManyTagsException = "TooManyTagsException"
        case unableToRollbackStageException = "UnableToRollbackStageException"
        case validationException = "ValidationException"
        case webhookNotFoundException = "WebhookNotFoundException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CodePipeline
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The action execution was not found.
    public static var actionExecutionNotFoundException: Self { .init(.actionExecutionNotFoundException) }
    /// The specified action cannot be found.
    public static var actionNotFoundException: Self { .init(.actionNotFoundException) }
    /// The specified action type cannot be found.
    public static var actionTypeNotFoundException: Self { .init(.actionTypeNotFoundException) }
    /// The approval action has already been approved or rejected.
    public static var approvalAlreadyCompletedException: Self { .init(.approvalAlreadyCompletedException) }
    /// Unable to modify the tag due to a simultaneous update request.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// The pipeline has reached the limit for concurrent pipeline executions.
    public static var concurrentPipelineExecutionsLimitExceededException: Self { .init(.concurrentPipelineExecutionsLimitExceededException) }
    /// Unable to override because the condition does not allow overrides.
    public static var conditionNotOverridableException: Self { .init(.conditionNotOverridableException) }
    /// Your request cannot be handled because the pipeline is busy handling ongoing activities. Try again later.
    public static var conflictException: Self { .init(.conflictException) }
    /// The pipeline execution is already in a Stopping state. If you already chose to stop and wait, you cannot make that request again. You can choose to stop and abandon now, but be aware that this option can lead to failed tasks or out of sequence tasks. If you already chose to stop and abandon, you cannot make that request again.
    public static var duplicatedStopRequestException: Self { .init(.duplicatedStopRequestException) }
    /// The action declaration was specified in an invalid format.
    public static var invalidActionDeclarationException: Self { .init(.invalidActionDeclarationException) }
    /// The approval request already received a response or has expired.
    public static var invalidApprovalTokenException: Self { .init(.invalidApprovalTokenException) }
    /// The specified resource ARN is invalid.
    public static var invalidArnException: Self { .init(.invalidArnException) }
    /// Reserved for future use.
    public static var invalidBlockerDeclarationException: Self { .init(.invalidBlockerDeclarationException) }
    /// The client token was specified in an invalid format
    public static var invalidClientTokenException: Self { .init(.invalidClientTokenException) }
    /// The job was specified in an invalid format or cannot be found.
    public static var invalidJobException: Self { .init(.invalidJobException) }
    /// The job state was specified in an invalid format.
    public static var invalidJobStateException: Self { .init(.invalidJobStateException) }
    /// The next token was specified in an invalid format. Make sure that the next token you provide is the token returned by a previous call.
    public static var invalidNextTokenException: Self { .init(.invalidNextTokenException) }
    /// The nonce was specified in an invalid format.
    public static var invalidNonceException: Self { .init(.invalidNonceException) }
    /// The stage declaration was specified in an invalid format.
    public static var invalidStageDeclarationException: Self { .init(.invalidStageDeclarationException) }
    /// The structure was specified in an invalid format.
    public static var invalidStructureException: Self { .init(.invalidStructureException) }
    /// The specified resource tags are invalid.
    public static var invalidTagsException: Self { .init(.invalidTagsException) }
    /// The specified authentication type is in an invalid format.
    public static var invalidWebhookAuthenticationParametersException: Self { .init(.invalidWebhookAuthenticationParametersException) }
    /// The specified event filter rule is in an invalid format.
    public static var invalidWebhookFilterPatternException: Self { .init(.invalidWebhookFilterPatternException) }
    /// The job was specified in an invalid format or cannot be found.
    public static var jobNotFoundException: Self { .init(.jobNotFoundException) }
    /// The number of pipelines associated with the Amazon Web Services account has exceeded the limit allowed for the account.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The stage has failed in a later run of the pipeline and the pipelineExecutionId associated with the request is out of date.
    public static var notLatestPipelineExecutionException: Self { .init(.notLatestPipelineExecutionException) }
    /// Exceeded the total size limit for all variables in the pipeline.
    public static var outputVariablesSizeExceededException: Self { .init(.outputVariablesSizeExceededException) }
    /// The pipeline execution was specified in an invalid format or cannot be found, or an execution ID does not belong to the specified pipeline.
    public static var pipelineExecutionNotFoundException: Self { .init(.pipelineExecutionNotFoundException) }
    /// Unable to stop the pipeline execution. The execution might already be in a Stopped state, or it might no longer be in progress.
    public static var pipelineExecutionNotStoppableException: Self { .init(.pipelineExecutionNotStoppableException) }
    /// The specified pipeline execution is outdated and cannot be used as a target pipeline execution for rollback.
    public static var pipelineExecutionOutdatedException: Self { .init(.pipelineExecutionOutdatedException) }
    /// The specified pipeline name is already in use.
    public static var pipelineNameInUseException: Self { .init(.pipelineNameInUseException) }
    /// The pipeline was specified in an invalid format or cannot be found.
    public static var pipelineNotFoundException: Self { .init(.pipelineNotFoundException) }
    /// The pipeline version was specified in an invalid format or cannot be found.
    public static var pipelineVersionNotFoundException: Self { .init(.pipelineVersionNotFoundException) }
    /// The request failed because of an unknown error, exception, or failure.
    public static var requestFailedException: Self { .init(.requestFailedException) }
    /// The resource was specified in an invalid format.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The stage was specified in an invalid format or cannot be found.
    public static var stageNotFoundException: Self { .init(.stageNotFoundException) }
    /// Unable to retry. The pipeline structure or stage state might have changed while actions awaited retry, or the stage contains no failed actions.
    public static var stageNotRetryableException: Self { .init(.stageNotRetryableException) }
    /// The tags limit for a resource has been exceeded.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// Unable to roll back the stage. The cause might be if the pipeline version has changed since the target pipeline execution was deployed, the stage is currently running, or an incorrect target pipeline execution ID was provided.
    public static var unableToRollbackStageException: Self { .init(.unableToRollbackStageException) }
    /// The validation was specified in an invalid format.
    public static var validationException: Self { .init(.validationException) }
    /// The specified webhook was entered in an invalid format or cannot be found.
    public static var webhookNotFoundException: Self { .init(.webhookNotFoundException) }
}

extension CodePipelineErrorType: Equatable {
    public static func == (lhs: CodePipelineErrorType, rhs: CodePipelineErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CodePipelineErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
